Skip to content

Commit

Permalink
fix pumpkin pies (removes cooked pumpkin pie item, makes vanilla pump…
Browse files Browse the repository at this point in the history
…kin pie a dynamic bowl food), fix drying mats working in snow, remove decay date rounding on food shelves (should fix time duplication), fix divide by zero error in vats, add sealed bricks as oven insulation
  • Loading branch information
eerussianguy committed Sep 3, 2023
1 parent 7e98aeb commit 4d72cda
Show file tree
Hide file tree
Showing 24 changed files with 72 additions and 114 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ mixin_version=0.8.5
jei_version=9.7.1.232
patchouli_version=1.18.2-70
tfc_version=0.0.0-indev
tfc_identifier=4616004
tfc_identifier=4723717
jade_version=3970956
top_version=3965688
2 changes: 1 addition & 1 deletion resources/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class Wood(NamedTuple):
'fig': Fruit(20, 35, 125, 215)
}

DISABLED_TFC_RECIPES = ('barrel/curdling', 'barrel/cheese', 'barrel/milk_vinegar')
DISABLED_TFC_RECIPES = ('barrel/curdling', 'barrel/cheese', 'barrel/milk_vinegar', 'crafting/pumpkin_pie')

GENETIC_DISEASES = ['Malformed Rectum', 'Malphigian Tubule Iridescence', 'Rectal Stones', 'Poor Osmoregulation', 'Nosemosis', 'Broken Wings']
PARASITIC_INFECTIONS = ['Chalkbrood', 'Stonebrood', 'Foulbrood', 'Wax Moths', 'Hive Beetles', 'Mites']
Expand Down
10 changes: 6 additions & 4 deletions resources/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ def generate(rm: ResourceManager):
rm.item_tag('pumpkin_knapping', 'tfc:pumpkin')
rm.item_tag('foods/heatable', 'firmalife:food/raw_pizza', 'firmalife:food/filled_pie', 'firmalife:food/raw_pumpkin_pie', 'firmalife:food/corn_tortilla', 'firmalife:food/masa', '#firmalife:foods/slices', 'firmalife:food/cocoa_beans', 'firmalife:food/bacon')
rm.item_tag('foods/dynamic', 'firmalife:food/raw_pizza', 'firmalife:food/filled_pie', 'firmalife:food/cooked_pizza', 'firmalife:food/cooked_pie', 'firmalife:food/burrito', 'firmalife:food/taco', 'firmalife:food/stinky_soup')
rm.item_tag('foods/washable', 'firmalife:food/filled_pie', 'firmalife:food/cooked_pie', 'firmalife:food/raw_pumpkin_pie', 'firmalife:food/cooked_pumpkin_pie', 'firmalife:food/stinky_soup')
rm.item_tag('foods/washable', 'firmalife:food/filled_pie', 'firmalife:food/cooked_pie', 'firmalife:food/raw_pumpkin_pie', 'minecraft:pumpkin_pie', 'firmalife:food/stinky_soup')
rm.item_tag('pie_pans', 'firmalife:pie_pan')
rm.item_tag('contains_pie_pan', 'firmalife:food/cooked_pumpkin_pie')
rm.item_tag('can_be_hung', '#tfc:foods/meats', 'tfc:food/garlic')
rm.item_tag('tfc:compost_greens_low', 'firmalife:fruit_leaf')
rm.item_tag('tfc:compost_greens', 'firmalife:food/nightshade_berry')
Expand All @@ -70,7 +69,7 @@ def generate(rm: ResourceManager):

block_and_item_tag(rm, 'tfc:wild_fruits', 'firmalife:plant/pineapple_bush', 'firmalife:plant/nightshade_bush', 'firmalife:plant/fig_sapling', 'firmalife:plant/cocoa_sapling')

rm.block_tag('oven_insulation', 'minecraft:bricks', '#tfc:forge_insulation', '#firmalife:oven_blocks', 'minecraft:brick_stairs', 'minecraft:brick_slab')
rm.block_tag('oven_insulation', 'minecraft:bricks', '#tfc:forge_insulation', '#firmalife:oven_blocks', 'minecraft:brick_stairs', 'minecraft:brick_slab', 'firmalife:sealed_bricks')
rm.block_tag('minecraft:mineable/pickaxe', '#firmalife:oven_blocks')
rm.block_tag('planters', *['firmalife:%s_planter' % p for p in PLANTERS])
rm.block_tag('bee_restoration_plants', *['tfc:plant/%s' % p for p in TFC_FLOWERS])
Expand Down Expand Up @@ -204,7 +203,6 @@ def generate(rm: ResourceManager):
food_item(rm, 'pumpkin_chunks', 'firmalife:food/pumpkin_chunks', Category.fruit, 4, 1, 5, 1.5, fruit=0.75)
decayable(rm, 'pumpkin_pie_dough', 'firmalife:food/pumpkin_pie_dough', Category.other)
decayable(rm, 'raw_pumpkin_pie', 'firmalife:food/raw_pumpkin_pie', Category.other)
decayable(rm, 'cooked_pumpkin_pie', 'firmalife:food/cooked_pumpkin_pie', Category.other)
decayable(rm, 'cocoa_beans', 'firmalife:food/cocoa_beans', Category.other, decay=0.25)
food_item(rm, 'fig', 'firmalife:food/fig', Category.fruit, 4, 1, 5, 0.8, fruit=0.9)
decayable(rm, 'roasted_cocoa_beans', 'firmalife:food/roasted_cocoa_beans', Category.other)
Expand Down Expand Up @@ -233,6 +231,10 @@ def generate(rm: ResourceManager):
dynamic_food_item(rm, 'burrito', 'firmalife:food/burrito', 'dynamic')
dynamic_food_item(rm, 'taco', 'firmalife:food/taco', 'dynamic')

rm.domain = 'tfc'
dynamic_food_item(rm, 'pumpkin_pie', 'minecraft:pumpkin_pie', 'dynamic_bowl')
rm.domain = 'firmalife'

item_size(rm, 'jars', '#firmalife:jars', Size.very_large, Weight.medium)
item_size(rm, 'beehive_frame', 'firmalife:beehive_frame', Size.very_small, Weight.very_heavy)
item_size(rm, 'cheese_wheels', '#firmalife:cheese_wheels', Size.very_large, Weight.very_heavy)
Expand Down
2 changes: 1 addition & 1 deletion resources/metal_stuff.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def item(_variant: str) -> str:
casting_recipe(rm, '%s_%s' % (metal, item), item, metal, item_data.smelt_amount, 0.1 if item == 'ingot' else 1)
if item == 'ingot':
casting_recipe(rm, '%s_%s_fire' % (metal, item), 'fire_ingot', metal, item_data.smelt_amount, 0.01, 'firmalife:metal/ingot/%s' % metal)
rm.blockstate(('fluid', 'metal', metal)).with_block_model({'particle': 'block/lava_still'}, parent=None).with_lang(lang('Molten %s', metal))
rm.blockstate(('fluid', 'metal', metal)).with_block_model({'particle': 'block/lava_still'}, parent=None).with_lang(lang('Molten %s', metal)).with_tag('minecraft:replaceable')
rm.lang('fluid.firmalife.metal.%s' % metal, lang('Molten %s', metal))
rm.fluid_tag(metal, 'firmalife:metal/%s' % metal, 'firmalife:metal/flowing_%s' % metal)
rm.fluid_tag('tfc:molten_metals', *['firmalife:metal/%s' % metal])
Expand Down
7 changes: 1 addition & 6 deletions resources/recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,10 @@ def craft_decorations(recipe_name: str, base_block: str):
rm.crafting_shapeless('crafting/pickled_egg', ('minecraft:clay_ball', 'tfc:powder/wood_ash', 'tfc:powder/salt', 'tfc:food/boiled_egg'), 'firmalife:food/pickled_egg')
rm.crafting_shaped('crafting/seed_ball', [' X ', 'XYX', ' X '], {'X': '#tfc:seeds', 'Y': 'tfc:compost'}, 'firmalife:seed_ball').with_advancement('tfc:compost')
rm.crafting_shapeless('crafting/raw_pumpkin_pie', ('firmalife:food/pumpkin_pie_dough', 'firmalife:pie_pan'), 'firmalife:food/raw_pumpkin_pie').with_advancement('firmalife:food/pumpkin_pie_dough')
#rm.crafting_shaped('crafting/squirting_moisture_transducer', ['XYX', 'XZX', 'XYX'], {'X': '#forge:sheets/stainless_steel', 'Y': 'tfc:brass_mechanisms', 'Z': '#forge:rods/nickel'}, 'firmalife:squirting_moisture_transducer').with_advancement('#forge:rods/stainless_steel')
#rm.crafting_shaped('crafting/embedded_pipe', ['XY', 'XY', 'ZZ'], {'X': '#forge:rods/stainless_steel', 'Y': '#forge:rods/copper', 'Z': 'firmalife:beeswax'}, '6 firmalife:embedded_pipe').with_advancement('#forge:rods/stainless_steel')
rm.crafting_shaped('crafting/treated_wood', ['XX', 'XX'], {'X': 'firmalife:treated_lumber'}, 'firmalife:treated_wood').with_advancement('firmalife:treated_lumber')
damage_shapeless(rm, 'crafting/pumpkin_chunks_bulk', ('#tfc:hammers', *(not_rotten('tfc:pumpkin') for _ in range(0, 8))), '8 firmalife:food/pumpkin_chunks').with_advancement('tfc:pumpkin')
rm.crafting_shapeless('crafting/garlic_bread', ('firmalife:food/toast', 'firmalife:food/butter', 'tfc:food/garlic'), 'firmalife:food/garlic_bread').with_advancement('tfc:food/garlic')
damage_shapeless(rm, 'crafting/salsa', ('tfc:food/tomato', 'tfc:powder/salt', 'firmalife:plant/cilantro', '#tfc:knives'), '5 firmalife:food/salsa').with_advancement('tfc:food/tomato')
rm.domain = 'tfc'
rm.crafting_shapeless('crafting/pumpkin_pie', ({'type': 'forge:nbt', 'item': 'firmalife:food/cooked_pumpkin_pie'},), 'minecraft:pumpkin_pie').with_advancement('firmalife:food/cooked_pumpkin_pie')
rm.domain = 'firmalife'
damage_shapeless(rm, 'crafting/pineapple_fiber', (not_rotten(has_trait('firmalife:food/pineapple', trait='firmalife:dried')), '#tfc:knives'), 'firmalife:pineapple_fiber').with_advancement('firmalife:food/pineapple')
damage_shapeless(rm, 'crafting/pineapple_yarn', ('tfc:spindle', 'firmalife:pineapple_fiber'), '8 firmalife:pineapple_yarn').with_advancement('firmalife:pineapple_fiber')
rm.crafting_shapeless('crafting/toast_with_jam', ('firmalife:food/toast', '#firmalife:foods/preserves'), 'firmalife:food/toast_with_jam').with_advancement('firmalife:food/toast')
Expand Down Expand Up @@ -223,7 +218,7 @@ def chisel_stair_slab(name: str, ingredient: str):

oven_recipe(rm, 'cooked_pie', not_rotten('firmalife:food/filled_pie'), 400, result_item=item_stack_provider('firmalife:food/cooked_pie', other_modifier='firmalife:copy_dynamic_food', remove_trait='firmalife:raw'))
oven_recipe(rm, 'cooked_pizza', not_rotten('firmalife:food/raw_pizza'), 400, result_item=item_stack_provider('firmalife:food/cooked_pizza', other_modifier='firmalife:copy_dynamic_food', remove_trait='firmalife:raw'))
oven_recipe(rm, 'pumpkin_pie', not_rotten('firmalife:food/raw_pumpkin_pie'), 400, result_item=item_stack_provider('firmalife:food/cooked_pumpkin_pie'))
oven_recipe(rm, 'pumpkin_pie', not_rotten('firmalife:food/raw_pumpkin_pie'), 400, result_item=item_stack_provider('minecraft:pumpkin_pie', other_modifier='firmalife:add_pie_pan'))
oven_recipe(rm, 'roasted_cocoa_beans', not_rotten('firmalife:food/cocoa_beans'), 400, result_item=item_stack_provider('firmalife:food/roasted_cocoa_beans'))
oven_recipe(rm, 'taco_shell', not_rotten('firmalife:food/corn_tortilla'), 400, result_item=item_stack_provider('firmalife:food/taco_shell'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static class Items
public static final TagKey<Item> OVEN_FUEL = create("oven_fuel");
public static final TagKey<Item> PUMPKIN_KNAPPING = create("pumpkin_knapping");
public static final TagKey<Item> PIE_PANS = create("pie_pans");
public static final TagKey<Item> CONTAINS_PIE_PAN = create("contains_pie_pan");
public static final TagKey<Item> CAN_BE_HUNG = create("can_be_hung");
public static final TagKey<Item> USABLE_IN_STOVETOP_SOUP = create("usable_in_stovetop_soup");
public static final TagKey<Item> BEEKEEPER_ARMOR = create("beekeeper_armor");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
package com.eerussianguy.firmalife.common.blockentities;

import java.util.function.Supplier;

import com.eerussianguy.firmalife.common.FLHelpers;
import com.eerussianguy.firmalife.common.recipes.DryingRecipe;
import com.eerussianguy.firmalife.config.FLConfig;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;

import com.eerussianguy.firmalife.common.FLHelpers;
import com.eerussianguy.firmalife.common.recipes.DryingRecipe;
import com.eerussianguy.firmalife.config.FLConfig;

import net.dries007.tfc.common.capabilities.PartialItemHandler;
import net.dries007.tfc.common.recipes.inventory.ItemStackInventory;
import net.dries007.tfc.util.EnvironmentHelpers;

public class DryingMatBlockEntity extends SimpleItemRecipeBlockEntity<DryingRecipe>
{
Expand All @@ -35,7 +34,7 @@ public static void serverTick(Level level, BlockPos pos, BlockState state, Dryin
mat.resetCounter();
}
// reset when it rains
if (level.getGameTime() % 60 == 0 && level.isRainingAt(pos.above()))
if (level.getGameTime() % 60 == 0 && EnvironmentHelpers.isRainingOrSnowing(level, pos) && level.canSeeSky(pos))
{
mat.resetCounter();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ else if (held.isEmpty())
ItemStack stack = inventory.extractItem(0, player.isShiftKeyDown() ? Integer.MAX_VALUE : 1, false);
if (stack.isEmpty()) return InteractionResult.PASS;
FoodCapability.removeTrait(stack, getFoodTrait());
FLHelpers.roundCreationDate(stack);
ItemHandlerHelper.giveItemToPlayer(player, stack);
res = InteractionResult.sidedSuccess(level.isClientSide);
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public enum FLFood
PIE_DOUGH,
PUMPKIN_PIE_DOUGH,
RAW_PUMPKIN_PIE,
COOKED_PUMPKIN_PIE,
PIZZA_DOUGH,
SHREDDED_CHEESE,
PICKLED_EGG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class FLItems
public static final RegistryObject<Item> BEEKEEPER_BOOTS = register("beekeeper_boots", () -> new ArmorItem(FLArmorMaterials.BEEKEEPER, EquipmentSlot.FEET, new Item.Properties().tab(TAB_COMBAT)));

public static final Map<Spice, RegistryObject<Item>> SPICES = Helpers.mapOfKeys(Spice.class, spice -> register("spice/" + spice.name(), MISC));
public static final Map<FLFood, RegistryObject<Item>> FOODS = Helpers.mapOfKeys(FLFood.class, food -> register("food/" + food.name(), () -> new DecayingContainerItem(new Item.Properties().food(food.getFoodProperties()).tab(FOOD))));
public static final Map<FLFood, RegistryObject<Item>> FOODS = Helpers.mapOfKeys(FLFood.class, food -> register("food/" + food.name(), () -> new DecayingItem(new Item.Properties().food(food.getFoodProperties()).tab(FOOD))));
public static final Map<FLFruit, RegistryObject<Item>> FRUITS = Helpers.mapOfKeys(FLFruit.class, food -> register("food/" + food.name(), () -> new DecayingItem(new Item.Properties().food(food.getFoodProperties()).tab(FOOD))));
public static final Map<OvenType, RegistryObject<Item>> FINISHES = Helpers.mapOfKeys(OvenType.class, type -> type != OvenType.BRICK, type -> register(type.getTrueName() + "_finish", () -> new FinishItem(prop(), type)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public boolean matches(VatBlockEntity.VatInventory container, Level level)
&& inputFluid.test(container.getFluidInTank(0))
&& (inputFluid.amount() == 0
|| outputFluid.getAmount() == 0
|| container.getFluidInTank(0).getAmount() / this.inputFluid.amount() <= container.getStackInSlot(0).getCount() / this.inputItem.count()
|| (inputItem.count() > 0 && inputFluid.amount() > 0 && container.getFluidInTank(0).getAmount() / this.inputFluid.amount() <= container.getStackInSlot(0).getCount() / this.inputItem.count())
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.eerussianguy.firmalife.common.recipes.data;

import com.eerussianguy.firmalife.common.items.FLItems;
import net.minecraft.world.item.ItemStack;

import net.dries007.tfc.common.capabilities.food.FoodCapability;
import net.dries007.tfc.common.items.DynamicBowlFood;
import net.dries007.tfc.common.recipes.outputs.ItemStackModifier;

public enum AddPiePanModifier implements ItemStackModifier.SingleInstance<AddPiePanModifier>
{
INSTANCE;

@Override
public AddPiePanModifier instance()
{
return INSTANCE;
}

@Override
public ItemStack apply(ItemStack stack, ItemStack input)
{
stack.getCapability(FoodCapability.CAPABILITY).ifPresent(cap -> {
if (cap instanceof DynamicBowlFood.DynamicBowlHandler handler)
{
handler.setBowl(new ItemStack(FLItems.PIE_PAN.get()));
}
});
return stack;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class FLItemStackModifiers
public static void init()
{
register("pie", PieModifier.INSTANCE);
register("add_pie_pan", AddPiePanModifier.INSTANCE);
register("pizza", PizzaModifier.INSTANCE);
register("copy_dynamic_food", CopyDynamicFoodModifier.INSTANCE);
register("burrito", BurritoModifier.INSTANCE);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
}
},
"result_item": {
"item": "firmalife:food/cooked_pumpkin_pie"
"stack": {
"item": "minecraft:pumpkin_pie"
},
"modifiers": [
"firmalife:add_pie_pan"
]
},
"temperature": 400,
"duration": 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"#tfc:forge_insulation",
"#firmalife:oven_blocks",
"minecraft:brick_stairs",
"minecraft:brick_slab"
"minecraft:brick_slab",
"firmalife:sealed_bricks"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"firmalife:food/filled_pie",
"firmalife:food/cooked_pie",
"firmalife:food/raw_pumpkin_pie",
"firmalife:food/cooked_pumpkin_pie",
"minecraft:pumpkin_pie",
"firmalife:food/stinky_soup"
]
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"__comment__": "This file was automatically created by mcresources",
"replace": false,
"values": [
"firmalife:food/cooked_pumpkin_pie"
"firmalife:fluid/metal/stainless_steel",
"firmalife:fluid/metal/chromium"
]
}
35 changes: 0 additions & 35 deletions src/main/resources/data/tfc/advancements/crafting/pumpkin_pie.json

This file was deleted.

11 changes: 3 additions & 8 deletions src/main/resources/data/tfc/recipes/crafting/pumpkin_pie.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"__comment__": "This file was automatically created by mcresources",
"type": "minecraft:crafting_shapeless",
"ingredients": [
"conditions": [
{
"type": "forge:nbt",
"item": "firmalife:food/cooked_pumpkin_pie"
"type": "forge:false"
}
],
"result": {
"item": "minecraft:pumpkin_pie"
}
]
}
4 changes: 2 additions & 2 deletions src/main/resources/data/tfc/tags/items/foods.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"firmalife:food/pumpkin_chunks",
"firmalife:food/pumpkin_pie_dough",
"firmalife:food/raw_pumpkin_pie",
"firmalife:food/cooked_pumpkin_pie",
"firmalife:food/cocoa_beans",
"firmalife:food/fig",
"firmalife:food/roasted_cocoa_beans",
Expand All @@ -55,6 +54,7 @@
"firmalife:food/raw_pizza",
"firmalife:food/cooked_pizza",
"firmalife:food/burrito",
"firmalife:food/taco"
"firmalife:food/taco",
"minecraft:pumpkin_pie"
]
}
7 changes: 7 additions & 0 deletions src/main/resources/data/tfc/tfc/food_items/pumpkin_pie.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"__comment__": "This file was automatically created by mcresources",
"ingredient": {
"item": "minecraft:pumpkin_pie"
},
"type": "dynamic_bowl"
}

0 comments on commit 4d72cda

Please sign in to comment.