From 39933c0409ad1e0c925a3f5efb1e717c199adf8b Mon Sep 17 00:00:00 2001 From: eerussianguy Date: Tue, 10 Dec 2024 19:43:52 -0500 Subject: [PATCH] - Mixing bowl recipes that result in no fluid output will leave excess fluid in the bowl - Allow red and yellow bell peppers to grow in greenhouses - Angry bees will despawn quickly instead of remaining angry forever --- CHANGELOG.md | 10 +++---- resources/data.py | 2 ++ .../blockentities/MixingBowlBlockEntity.java | 8 ++++-- .../common/blocks/MixingBowlBlock.java | 2 +- .../firmalife/common/entities/FLBee.java | 2 +- .../firmalife/plantable/red_bell_pepper.json | 26 +++++++++++++++++++ .../plantable/yellow_bell_pepper.json | 26 +++++++++++++++++++ 7 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 src/main/resources/data/firmalife/firmalife/plantable/red_bell_pepper.json create mode 100644 src/main/resources/data/firmalife/firmalife/plantable/yellow_bell_pepper.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b92d96c..125badc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,4 @@ ### Changes -- Added Stainless Steel jar lids. -- Updated the stomping barrel recipe again. -- Made the check for flowers for bees much more forgiving, most plants should work now. -- Reduced the oil requirement for pizzas to 100 mB. -- Added soybean oil. It burns slightly less efficiently than olive oil in a lamp, and may be substituted for olive oil in pizza. -- Fix bad links for field guide redirects. (Closes #179) -- Updated Chinese translation \ No newline at end of file +- Mixing bowl recipes that result in no fluid output will leave excess fluid in the bowl +- Allow red and yellow bell peppers to grow in greenhouses +- Angry bees will despawn quickly instead of remaining angry forever \ No newline at end of file diff --git a/resources/data.py b/resources/data.py index d64daf43..876f6c8c 100644 --- a/resources/data.py +++ b/resources/data.py @@ -64,6 +64,8 @@ def generate(rm: ResourceManager): simple_plantable(rm, 'green_bean', 'nitrogen', 4, planter='large', firmalife=True) simple_plantable(rm, 'tomato', 'potassium', 4, planter='large', firmalife=True) simple_plantable(rm, 'sugarcane', 'potassium', 4, planter='large', firmalife=True) + simple_plantable(rm, 'red_bell_pepper', 'potassium', 6, planter='large') + simple_plantable(rm, 'yellow_bell_pepper', 'potassium', 6, planter='large') plantable(rm, 'jute', 'tfc:seeds/jute', 'tfc:jute', 'potassium', ['firmalife:block/crop/jute_%s' % i for i in range(0, 5)], 4, 'large') plantable(rm, 'papyrus', 'tfc:seeds/papyrus', 'tfc:papyrus', 'potassium', ['firmalife:block/crop/papyrus_%s' % i for i in range(0, 6)], 5, 'large') plantable(rm, 'red_grapes', 'firmalife:seeds/red_grape', 'firmalife:food/red_grapes', 'nitrogen', ['firmalife:block/crop/%s' % c for c in ('grape_leaves', 'grape_leaves_dead', 'grape_leaves_flowering', 'grape_leaves_red')], 0, 'trellis', tier=15, seed_chance=0.1) diff --git a/src/main/java/com/eerussianguy/firmalife/common/blockentities/MixingBowlBlockEntity.java b/src/main/java/com/eerussianguy/firmalife/common/blockentities/MixingBowlBlockEntity.java index f3eee50d..389c3aa9 100644 --- a/src/main/java/com/eerussianguy/firmalife/common/blockentities/MixingBowlBlockEntity.java +++ b/src/main/java/com/eerussianguy/firmalife/common/blockentities/MixingBowlBlockEntity.java @@ -188,8 +188,12 @@ private void finishMixing() break; } } - inventory.drain(FluidHelpers.BUCKET_VOLUME, IFluidHandler.FluidAction.EXECUTE); - inventory.fill(recipe.getResultFluid(), IFluidHandler.FluidAction.EXECUTE); + inventory.drain(recipe.getFluidIngredient().amount(), IFluidHandler.FluidAction.EXECUTE); + if (!recipe.getResultFluid().isEmpty()) + { + inventory.drain(FluidHelpers.BUCKET_VOLUME, IFluidHandler.FluidAction.EXECUTE); + inventory.fill(recipe.getResultFluid(), IFluidHandler.FluidAction.EXECUTE); + } } markForSync(); } diff --git a/src/main/java/com/eerussianguy/firmalife/common/blocks/MixingBowlBlock.java b/src/main/java/com/eerussianguy/firmalife/common/blocks/MixingBowlBlock.java index 8d3f1c58..ced5ca03 100644 --- a/src/main/java/com/eerussianguy/firmalife/common/blocks/MixingBowlBlock.java +++ b/src/main/java/com/eerussianguy/firmalife/common/blocks/MixingBowlBlock.java @@ -38,7 +38,7 @@ public MixingBowlBlock(ExtendedProperties properties) @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult result) { - ItemStack held = player.getItemInHand(hand); + final ItemStack held = player.getItemInHand(hand); return level.getBlockEntity(pos, FLBlockEntities.MIXING_BOWL.get()).map(bowl -> { if (!bowl.isMixing()) { diff --git a/src/main/java/com/eerussianguy/firmalife/common/entities/FLBee.java b/src/main/java/com/eerussianguy/firmalife/common/entities/FLBee.java index 5b4b09aa..f51b3d0f 100644 --- a/src/main/java/com/eerussianguy/firmalife/common/entities/FLBee.java +++ b/src/main/java/com/eerussianguy/firmalife/common/entities/FLBee.java @@ -94,7 +94,7 @@ public void aiStep() } else if (tickCount % 400 == 0) { - if (Calendars.get(this.level()).getTotalCalendarDays() > daySpawned && daySpawned >= 0) + if ((Calendars.get(this.level()).getTotalCalendarDays() > daySpawned && daySpawned >= 0) || isAngry()) { this.discard(); } diff --git a/src/main/resources/data/firmalife/firmalife/plantable/red_bell_pepper.json b/src/main/resources/data/firmalife/firmalife/plantable/red_bell_pepper.json new file mode 100644 index 00000000..f2c3fb68 --- /dev/null +++ b/src/main/resources/data/firmalife/firmalife/plantable/red_bell_pepper.json @@ -0,0 +1,26 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "planter": "large", + "ingredient": { + "item": "tfc:seeds/red_bell_pepper" + }, + "seed": { + "item": "tfc:seeds/red_bell_pepper" + }, + "crop": { + "item": "tfc:food/red_bell_pepper" + }, + "nutrient": "potassium", + "stages": 6, + "texture": [ + "tfc:block/crop/red_bell_pepper_0", + "tfc:block/crop/red_bell_pepper_1", + "tfc:block/crop/red_bell_pepper_2", + "tfc:block/crop/red_bell_pepper_3", + "tfc:block/crop/red_bell_pepper_4", + "tfc:block/crop/red_bell_pepper_5", + "tfc:block/crop/red_bell_pepper_6" + ], + "specials": [], + "extra_seed_chance": 0.5 +} \ No newline at end of file diff --git a/src/main/resources/data/firmalife/firmalife/plantable/yellow_bell_pepper.json b/src/main/resources/data/firmalife/firmalife/plantable/yellow_bell_pepper.json new file mode 100644 index 00000000..7cb50e79 --- /dev/null +++ b/src/main/resources/data/firmalife/firmalife/plantable/yellow_bell_pepper.json @@ -0,0 +1,26 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "planter": "large", + "ingredient": { + "item": "tfc:seeds/yellow_bell_pepper" + }, + "seed": { + "item": "tfc:seeds/yellow_bell_pepper" + }, + "crop": { + "item": "tfc:food/yellow_bell_pepper" + }, + "nutrient": "potassium", + "stages": 6, + "texture": [ + "tfc:block/crop/yellow_bell_pepper_0", + "tfc:block/crop/yellow_bell_pepper_1", + "tfc:block/crop/yellow_bell_pepper_2", + "tfc:block/crop/yellow_bell_pepper_3", + "tfc:block/crop/yellow_bell_pepper_4", + "tfc:block/crop/yellow_bell_pepper_5", + "tfc:block/crop/yellow_bell_pepper_6" + ], + "specials": [], + "extra_seed_chance": 0.5 +} \ No newline at end of file