Commit 566db9e 1 parent 378dcb6 commit 566db9e Copy full SHA for 566db9e
File tree 6 files changed +45
-6
lines changed
java/barch/mc_extended/Foods
6 files changed +45
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ loader_version=0.14.21
10
10
11
11
12
12
# Mod Properties
13
- mod_version =0.3.1
13
+ mod_version =0.4.0
14
14
maven_group =barch.mc_extended
15
15
archives_base_name =mc-extended
16
16
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public class Cheese {
25
25
.saturationModifier (12 )
26
26
.build ();
27
27
28
- public static final Item BACON_AND_MUSHROOMS = new StewItem (new FabricItemSettings ().food (BACON_AND_MUSHROOMS_FOOD_COMPONENT ));
28
+ public static final Item BACON_AND_MUSHROOMS = new ContainedFood (new FabricItemSettings ().food (BACON_AND_MUSHROOMS_FOOD_COMPONENT ). maxCount ( 16 ), Items . BOWL );
29
29
30
30
public static void RegisterAll () {
31
31
Original file line number Diff line number Diff line change
1
+ package barch .mc_extended .Foods ;
2
+
3
+ import net .minecraft .entity .LivingEntity ;
4
+ import net .minecraft .entity .player .PlayerEntity ;
5
+ import net .minecraft .item .Item ;
6
+ import net .minecraft .item .ItemStack ;
7
+ import net .minecraft .world .World ;
8
+
9
+ public class ContainedFood extends Item {
10
+ private final Item giveBack ;
11
+
12
+ public ContainedFood (Settings settings , Item giveBack ) {
13
+ super (settings );
14
+ this .giveBack = giveBack ;
15
+ }
16
+
17
+ @ Override
18
+ public ItemStack finishUsing (ItemStack stack , World world , LivingEntity user ) {
19
+ ItemStack itemStack = super .finishUsing (stack , world , user );
20
+ if (user instanceof PlayerEntity && ((PlayerEntity )user ).getAbilities ().creativeMode ) {
21
+ return itemStack ;
22
+ }
23
+
24
+ if (itemStack .getCount () < 1 ) {
25
+ return new ItemStack (this .giveBack );
26
+ }
27
+
28
+ user .dropItem (this .giveBack , 1 );
29
+ return itemStack ;
30
+ }
31
+ }
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public class Onion {
76
76
public static final Item FRIED_ONION = new Item (new FabricItemSettings ().food (FRIED_ONION_FOOD_COMPONANT ));
77
77
78
78
// onion sauce
79
- public static final Item ONION_TOMATO_SAUCE = new StewItem (new FabricItemSettings ().food (ONION_SAUCE_FOOD_COMPONANT ). maxCount ( 1 ) );
79
+ public static final Item ONION_TOMATO_SAUCE = new ContainedFood (new FabricItemSettings ().food (ONION_SAUCE_FOOD_COMPONANT ), Items . BOWL );
80
80
81
81
82
82
// onion feature
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public class Tomato {
76
76
public static final Item ROAST_TOMATO = new Item (new FabricItemSettings ().food (ROAST_TOMATO_FOOD_COMPONANT ));
77
77
78
78
// tomato sauce
79
- public static final Item TOMATO_SAUCE = new StewItem (new FabricItemSettings ().food (TOMATO_SAUCE_FOOD_COMPONANT ). maxCount ( 1 ) );
79
+ public static final Item TOMATO_SAUCE = new ContainedFood (new FabricItemSettings ().food (TOMATO_SAUCE_FOOD_COMPONANT ), Items . BOWL );
80
80
81
81
82
82
// tomato feature
Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## [ 0.4.0] - 2023-9-8
9
+ ### Changed
10
+ - all stews are now "ContainedFoods"
11
+ - tomato sauce
12
+ - onion tomato sauce
13
+ - bacon and mushrooms
14
+
8
15
## [ 0.3.1] - 2023-9-8
9
16
### Fixed
10
17
- bacon and mushrooms model
@@ -292,8 +299,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
292
299
- deepslate ruby ore
293
300
- ruby block
294
301
295
- [ 0.3.0 ] : https://github.com/BarchamMal/MC-Extended/commit/
296
- [ 0.3.1 ] : https://github.com/BarchamMal/MC-Extended/commit/97641cc3b4809d947953fd8fa6c8d16cbb0ba7e4
302
+ [ 0.4.0 ] : https://github.com/BarchamMal/MC-Extended/commit/
303
+ [ 0.3.1 ] : https://github.com/BarchamMal/MC-Extended/commit/378dcb6ab5cea2841aa15ba7db474b11b56b5538
304
+ [ 0.3.0 ] : https://github.com/BarchamMal/MC-Extended/commit/97641cc3b4809d947953fd8fa6c8d16cbb0ba7e4
297
305
[ 0.2.5 ] : https://github.com/BarchamMal/MC-Extended/commit/97641cc3b4809d947953fd8fa6c8d16cbb0ba7e4
298
306
[ 0.2.4 ] : https://github.com/BarchamMal/MC-Extended/commit/c7b83a5135e549532c4dd4b6657f140957cfd31f
299
307
[ 0.2.3 ] : https://github.com/BarchamMal/MC-Extended/commit/747cc0ceb81f4288abf79e40784574a3411c76ac
You can’t perform that action at this time.
0 commit comments