Skip to content

Commit

Permalink
- Fix a bug that allowed the use of rotten food in the vat
Browse files Browse the repository at this point in the history
- Fix a visual bug caused by the compost tumbler
- Fix incorrect info in the field guide about the compost tumbler
- Fix an issue where the oven heated items in a way that ignored heat capacity. Items may heat much slower in the oven now.
  • Loading branch information
eerussianguy committed Dec 29, 2024
1 parent 4c18c8f commit 3f449a4
Show file tree
Hide file tree
Showing 50 changed files with 415 additions and 252 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Changes
- 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
- Fix a bug that allowed the use of rotten food in the vat
- Fix a visual bug caused by the compost tumbler
- Fix incorrect info in the field guide about the compost tumbler
- Fix an issue where the oven heated items in a way that ignored heat capacity. Items may heat much slower in the oven now.
4 changes: 1 addition & 3 deletions resources/generate_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,8 @@ def make_book(rm: ResourceManager, i18n: I18n, local_instance: bool = False, rev
crafting('firmalife:crafting/compost_tumbler', text_contents='The compost tumbler is unique in that it takes more types of compost, and does not require precise ratios in order to work.'),
text('The tumbler can take green and brown items like a regular composter. It can also take pottery sherds, charcoal, fish, and bones in small amounts.'),
crafting('firmalife:crafting/pottery_sherd', text_contents='Smashing pottery with a hammer yields sherds.'),
text('While the regular composter takes 16 \'compost units\', the tumbler can hold 32. Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1.'),
text('Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot.'),
text('Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1. Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot.'),
text('Favorable amounts of certain additions can extend or shorten the length of time it takes for the compost to complete. Play around with it and see what happens.$(br)If 32 units are in the composter, 3 compost will be produced. If at least 24, 2 compost will be made. If 16 or more, 1 will be made. Below that, and there will be no compost.'),
empty_last_page(),
)),
entry('mixing_bowl', 'Mixing Bowl', 'firmalife:mixing_bowl', pages=(
text('The mixing bowl is a way of mixing items and fluids together in a friendly way. $(item)$(k:key.use)$() on it with a $(thing)Spoon$() to add it to the bowl, which allows it to operate.'),
Expand Down
3 changes: 1 addition & 2 deletions resources/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@
"The compost tumbler is unique in that it takes more types of compost, and does not require precise ratios in order to work.": "The compost tumbler is unique in that it takes more types of compost, and does not require precise ratios in order to work.",
"The tumbler can take green and brown items like a regular composter. It can also take pottery sherds, charcoal, fish, and bones in small amounts.": "The tumbler can take green and brown items like a regular composter. It can also take pottery sherds, charcoal, fish, and bones in small amounts.",
"Smashing pottery with a hammer yields sherds.": "Smashing pottery with a hammer yields sherds.",
"While the regular composter takes 16 'compost units', the tumbler can hold 32. Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1.": "While the regular composter takes 16 'compost units', the tumbler can hold 32. Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1.",
"Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot.": "Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot.",
"Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1. Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot.": "Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1. Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot.",
"Favorable amounts of certain additions can extend or shorten the length of time it takes for the compost to complete. Play around with it and see what happens.$(br)If 32 units are in the composter, 3 compost will be produced. If at least 24, 2 compost will be made. If 16 or more, 1 will be made. Below that, and there will be no compost.": "Favorable amounts of certain additions can extend or shorten the length of time it takes for the compost to complete. Play around with it and see what happens.$(br)If 32 units are in the composter, 3 compost will be produced. If at least 24, 2 compost will be made. If 16 or more, 1 will be made. Below that, and there will be no compost.",
"Mixing Bowl": "Mixing Bowl",
"The mixing bowl is a way of mixing items and fluids together in a friendly way. $(item)$(k:key.use)$() on it with a $(thing)Spoon$() to add it to the bowl, which allows it to operate.": "The mixing bowl is a way of mixing items and fluids together in a friendly way. $(item)$(k:key.use)$() on it with a $(thing)Spoon$() to add it to the bowl, which allows it to operate.",
Expand Down
16 changes: 8 additions & 8 deletions resources/recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,20 @@ def chisel_stair_slab(name: str, ingredient: str):
vat_recipe(rm, 'olive_oil_water', 'tfc:olive_paste', '200 minecraft:water', output_fluid='200 tfc:olive_oil_water')
vat_recipe(rm, 'tallow', 'tfc:blubber', '200 minecraft:water', output_fluid='200 tfc:tallow')
vat_recipe(rm, 'lye', 'tfc:powder/wood_ash', '200 minecraft:water', output_fluid='200 tfc:lye')
vat_recipe(rm, 'cooked_rice', not_rotten('tfc:food/rice_grain'), '200 minecraft:water', output_item='tfc:food/cooked_rice')
vat_recipe(rm, 'boiled_egg', not_rotten('#firmalife:foods/raw_eggs'), '200 minecraft:water', output_item='tfc:food/boiled_egg')
vat_recipe(rm, 'cooked_rice', {'ingredient': not_rotten('tfc:food/rice_grain')}, '200 minecraft:water', output_item='tfc:food/cooked_rice')
vat_recipe(rm, 'boiled_egg', {'ingredient': not_rotten('#firmalife:foods/raw_eggs')}, '200 minecraft:water', output_item='tfc:food/boiled_egg')
for color in COLORS:
vat_recipe(rm, '%s_dye' % color, 'minecraft:%s_dye' % color, '1000 minecraft:water', output_fluid='1000 tfc:%s_dye' % color)
vat_recipe(rm, 'beet_sugar', {'count': 5, 'ingredient': not_rotten('tfc:food/beet')}, '1000 tfc:salt_water', output_item='3 minecraft:sugar')
vat_recipe(rm, 'soy_mixture', not_rotten('tfc:food/soybean'), '1000 tfc:salt_water', output_item='firmalife:food/soy_mixture')
vat_recipe(rm, 'cured_maize', not_rotten('tfc:food/maize_grain'), '1000 tfc:limewater', output_item='firmalife:food/cured_maize')
vat_recipe(rm, 'tomato_sauce', not_rotten('firmalife:food/tomato_sauce_mix'), '200 minecraft:water', output_item='firmalife:food/tomato_sauce')
vat_recipe(rm, 'soy_mixture', {'ingredient': not_rotten('tfc:food/soybean')}, '1000 tfc:salt_water', output_item='firmalife:food/soy_mixture')
vat_recipe(rm, 'cured_maize', {'ingredient': not_rotten('tfc:food/maize_grain')}, '1000 tfc:limewater', output_item='firmalife:food/cured_maize')
vat_recipe(rm, 'tomato_sauce', {'ingredient': not_rotten('firmalife:food/tomato_sauce_mix')}, '200 minecraft:water', output_item='firmalife:food/tomato_sauce')
vat_recipe(rm, 'sugar_water', '#tfc:sweetener', '1000 minecraft:water', output_fluid='500 firmalife:sugar_water')

for jar, remainder, ing in JARS:
make_jar(rm, jar, remainder, ing)
for fruit in FL_FRUITS:
ing = not_rotten(lacks_trait('firmalife:food/%s' % fruit, 'firmalife:dried'))
ing = {'ingredient': not_rotten(lacks_trait('firmalife:food/%s' % fruit, 'firmalife:dried'))}
vat_recipe(rm, '%s_jar' % fruit, ing, '500 firmalife:sugar_water', jar='firmalife:jar/%s' % fruit, output_texture='firmalife:block/jar/%s' % fruit)
for count in (2, 3, 4):
rm.recipe(('pot', 'jam_%s_%s' % (fruit, count)), 'tfc:pot_jam', {
Expand All @@ -189,7 +189,7 @@ def chisel_stair_slab(name: str, ingredient: str):
})
rm.crafting_shapeless('crafting/unseal_%s_jar' % fruit, (not_rotten('firmalife:jar/%s' % fruit), ), 'firmalife:jar/%s_unsealed' % fruit).with_advancement('firmalife:jar/%s' % fruit)
for fruit in TFC_FRUITS:
ing = not_rotten(has_trait('tfc:food/%s' % fruit, 'firmalife:dried', True))
ing = {'ingredient': not_rotten(lacks_trait('tfc:food/%s' % fruit, 'firmalife:dried'))}
vat_recipe(rm, '%s_jar' % fruit, ing, '500 firmalife:sugar_water', jar='tfc:jar/%s' % fruit, output_texture='tfc:block/jar/%s' % fruit)

beet = not_rotten('tfc:food/beet')
Expand Down Expand Up @@ -596,7 +596,7 @@ def has_trait(ingredient: Json, trait: str, invert: bool = False) -> Json:
return {
'type': 'tfc:lacks_trait' if invert else 'tfc:has_trait',
'trait': trait,
'ingredient': utils.ingredient(ingredient)
'ingredient': utils.ingredient(ingredient),
}

def lacks_trait(ingredient: Json, trait: str) -> Json:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
Expand Down Expand Up @@ -73,7 +74,7 @@ public void render(CompostTumblerBlockEntity composter, float partialTicks, Pose

if (!isRotating)
{
modelRenderer.tesselateWithAO(level, baked, state, pos, poseStack, buffer, true, level.getRandom(), combinedLight, combinedOverlay, ModelData.EMPTY, RenderType.cutout());
modelRenderer.tesselateWithAO(level, baked, state, pos, poseStack, buffer, true, RandomSource.create(), combinedLight, combinedOverlay, ModelData.EMPTY, RenderType.cutout());

ResourceLocation texture = NORMAL_TEXTURE;
if (composter.isRotten())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.dries007.tfc.common.capabilities.PartialItemHandler;
import net.dries007.tfc.common.capabilities.food.FoodCapability;
import net.dries007.tfc.common.capabilities.heat.HeatCapability;
import net.dries007.tfc.common.capabilities.heat.IHeat;
import net.dries007.tfc.common.recipes.inventory.ItemStackInventory;
import net.dries007.tfc.util.Helpers;
import net.dries007.tfc.util.calendar.ICalendarTickable;
Expand Down Expand Up @@ -80,12 +81,14 @@ public static void serverTick(Level level, BlockPos pos, BlockState state, OvenT
final ItemStack inputStack = oven.inventory.getStackInSlot(i);
if (!inputStack.isEmpty())
{
inputStack.getCapability(HeatCapability.CAPABILITY).ifPresent(cap -> {
final IHeat cap = HeatCapability.get(inputStack);
if (cap != null)
{
// Always heat up the item regardless if it is melting or not
final float targetTemp = oven.isInsulated ? oven.temperature : oven.temperature * 0.5f;
if (cap.getTemperature() < targetTemp)
{
final float modifier = FoodCapability.hasTrait(inputStack, FLFoodTraits.OVEN_BAKED) ? 2f : 2 + targetTemp + 0.0025f; // Breaks even at 400 C
final float modifier = FoodCapability.hasTrait(inputStack, FLFoodTraits.OVEN_BAKED) ? 2f : 2 + (targetTemp * 0.0025f); // Breaks even at 400 C
HeatCapability.addTemp(cap, targetTemp, modifier);
}

Expand All @@ -109,7 +112,7 @@ public static void serverTick(Level level, BlockPos pos, BlockState state, OvenT
oven.needsRecipeUpdate = true;
}
}
});
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
},
{
"type": "patchouli:text",
"text": "While the regular composter takes 16 'compost units', the tumbler can hold 32. Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1."
},
{
"type": "patchouli:text",
"text": "Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot."
"text": "Green and brown items count the same, being on the range 1-4, but the new additions like fish always count for 1. Adding too much weird stuff to the composter causes it to produce rotten compost. Further, you will not know it is rotten until the very end! If the compost is more than fifteen percent bones, fish, or pottery, or more than twenty percent charcoal. it will rot. Or, if there are 10 or more green units than brown units, it will rot."
},
{
"type": "patchouli:text",
Expand Down
20 changes: 12 additions & 8 deletions src/main/resources/data/firmalife/recipes/pot/jam_fig_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@
"type": "tfc:pot_jam",
"ingredients": [
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
Expand Down
30 changes: 18 additions & 12 deletions src/main/resources/data/firmalife/recipes/pot/jam_fig_3.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,38 @@
"type": "tfc:pot_jam",
"ingredients": [
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
Expand Down
40 changes: 24 additions & 16 deletions src/main/resources/data/firmalife/recipes/pot/jam_fig_4.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,50 @@
"type": "tfc:pot_jam",
"ingredients": [
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/fig"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/fig"
}
}
}
},
Expand Down
20 changes: 12 additions & 8 deletions src/main/resources/data/firmalife/recipes/pot/jam_pineapple_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@
"type": "tfc:pot_jam",
"ingredients": [
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/pineapple"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/pineapple"
}
}
}
},
{
"type": "tfc:not_rotten",
"ingredient": {
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"type": "tfc:not_rotten",
"ingredient": {
"item": "firmalife:food/pineapple"
"type": "tfc:lacks_trait",
"trait": "firmalife:dried",
"ingredient": {
"item": "firmalife:food/pineapple"
}
}
}
},
Expand Down
Loading

0 comments on commit 3f449a4

Please sign in to comment.