From ab17d7fea4210b65ac40c831f95cd054b91122fc Mon Sep 17 00:00:00 2001 From: EERussianguy Date: Fri, 29 Dec 2023 13:01:48 -0500 Subject: [PATCH] make most pot recipes requires 100mb, allow making cured maize with 1-5 grains instead of only 1, add freshwater beet sugar recipe, improve dependency for tfc to hopefully appear correctly on modrinth --- build.gradle.kts | 2 +- resources/recipes.py | 13 +++-- .../firmalife/client/FLClientEvents.java | 15 ++++++ src/main/resources/META-INF/mods.toml | 5 ++ .../firmalife/recipes/pot/beet_sugar.json | 2 +- .../recipes/pot/beet_sugar_freshwater.json | 47 +++++++++++++++++++ .../firmalife/recipes/pot/cured_maize_1.json | 23 +++++++++ .../firmalife/recipes/pot/cured_maize_2.json | 29 ++++++++++++ .../firmalife/recipes/pot/cured_maize_3.json | 35 ++++++++++++++ .../firmalife/recipes/pot/cured_maize_4.json | 41 ++++++++++++++++ .../firmalife/recipes/pot/cured_maize_5.json | 47 +++++++++++++++++++ .../firmalife/recipes/pot/soy_mixture.json | 2 +- .../firmalife/recipes/pot/tomato_sauce.json | 2 +- 13 files changed, 255 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/data/firmalife/recipes/pot/beet_sugar_freshwater.json create mode 100644 src/main/resources/data/firmalife/recipes/pot/cured_maize_1.json create mode 100644 src/main/resources/data/firmalife/recipes/pot/cured_maize_2.json create mode 100644 src/main/resources/data/firmalife/recipes/pot/cured_maize_3.json create mode 100644 src/main/resources/data/firmalife/recipes/pot/cured_maize_4.json create mode 100644 src/main/resources/data/firmalife/recipes/pot/cured_maize_5.json diff --git a/build.gradle.kts b/build.gradle.kts index 66e5a303..16c992d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ val jeiVersion: String = "15.2.0.21" val patchouliVersion: String = "1.20.1-81-FORGE" val jadeVersion: String = "4614153" val topVersion: String = "4629624" -val tfcVersion: String = "4915584" +val tfcVersion: String = "4976574" val modId: String = "firmalife" diff --git a/resources/recipes.py b/resources/recipes.py index d16ac13c..7335666a 100644 --- a/resources/recipes.py +++ b/resources/recipes.py @@ -182,10 +182,11 @@ def chisel_stair_slab(name: str, ingredient: str): vat_recipe(rm, '%s_jar' % fruit, ing, '500 firmalife:sugar_water', output_fluid='500 firmalife:fruity_fluid', jar='tfc:jar/%s' % fruit) beet = not_rotten('tfc:food/beet') - simple_pot_recipe(rm, 'beet_sugar', [beet, beet, beet, beet, beet], '1000 tfc:salt_water', output_items=['minecraft:sugar', 'minecraft:sugar', 'minecraft:sugar']) - simple_pot_recipe(rm, 'soy_mixture', [not_rotten('tfc:food/soybean'), not_rotten('tfc:food/soybean'), utils.ingredient('tfc:powder/salt'), utils.ingredient('tfc:powder/salt')], '1000 minecraft:water', output_items=['firmalife:food/soy_mixture', 'firmalife:food/soy_mixture']) - simple_pot_recipe(rm, 'cured_maize', [not_rotten('tfc:food/maize_grain')], '1000 tfc:limewater', output_items=['firmalife:food/cured_maize'], duration=3000) - simple_pot_recipe(rm, 'tomato_sauce', [not_rotten('tfc:food/tomato'), utils.ingredient('tfc:powder/salt'), not_rotten('tfc:food/garlic')], '1000 minecraft:water', output_items=['firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce']) + simple_pot_recipe(rm, 'beet_sugar', [beet, beet, beet, beet, beet], '100 tfc:salt_water', output_items=['minecraft:sugar', 'minecraft:sugar', 'minecraft:sugar']) + simple_pot_recipe(rm, 'beet_sugar_freshwater', [beet, beet, beet, beet, utils.ingredient('tfc:powder/salt')], '100 minecraft:water', output_items=['minecraft:sugar', 'minecraft:sugar']) + simple_pot_recipe(rm, 'soy_mixture', [not_rotten('tfc:food/soybean'), not_rotten('tfc:food/soybean'), utils.ingredient('tfc:powder/salt'), utils.ingredient('tfc:powder/salt')], '100 minecraft:water', output_items=['firmalife:food/soy_mixture', 'firmalife:food/soy_mixture']) + simple_pot_recipe_5(rm, 'cured_maize', not_rotten('tfc:food/maize_grain'), '100 tfc:limewater', output_items=['firmalife:food/cured_maize'], duration=3000) + simple_pot_recipe(rm, 'tomato_sauce', [not_rotten('tfc:food/tomato'), utils.ingredient('tfc:powder/salt'), not_rotten('tfc:food/garlic')], '100 minecraft:water', output_items=['firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce', 'firmalife:food/tomato_sauce']) simple_pot_recipe(rm, 'chocolate', [utils.ingredient('#tfc:sweetener'), not_rotten('#firmalife:foods/chocolate')], '1000 #tfc:milks', output_fluid='1000 firmalife:chocolate') soup_food = not_rotten(utils.ingredient('#tfc:foods/usable_in_soup')) @@ -549,6 +550,10 @@ def welding_recipe(rm: ResourceManager, name_parts: utils.ResourceIdentifier, fi 'result': item_stack_provider(result) }) +def simple_pot_recipe_5(rm: ResourceManager, name_parts: utils.ResourceIdentifier, ingredient: Json, fluid: str, output_fluid: str = None, output_items: Json = None, duration: int = 2000, temp: int = 300): + for i in range(1, 6): + simple_pot_recipe(rm, name_parts + '_' + str(i), [*[ingredient] * i], fluid, output_fluid, output_items, duration, temp) + def simple_pot_recipe(rm: ResourceManager, name_parts: utils.ResourceIdentifier, ingredients: Json, fluid: str, output_fluid: str = None, output_items: Json = None, duration: int = 2000, temp: int = 300): rm.recipe(('pot', name_parts), 'tfc:pot', { 'ingredients': ingredients, diff --git a/src/main/java/com/eerussianguy/firmalife/client/FLClientEvents.java b/src/main/java/com/eerussianguy/firmalife/client/FLClientEvents.java index 4246e06b..bb4af8db 100644 --- a/src/main/java/com/eerussianguy/firmalife/client/FLClientEvents.java +++ b/src/main/java/com/eerussianguy/firmalife/client/FLClientEvents.java @@ -1,8 +1,10 @@ package com.eerussianguy.firmalife.client; +import java.util.Objects; import java.util.function.Supplier; import java.util.stream.Stream; +import com.eerussianguy.firmalife.FirmaLife; import com.eerussianguy.firmalife.client.model.BonsaiPlanterBlockModel; import com.eerussianguy.firmalife.client.model.FoodShelfBlockModel; import com.eerussianguy.firmalife.client.model.HangerBlockModel; @@ -30,7 +32,9 @@ import net.minecraft.client.renderer.entity.ThrownItemRenderer; import net.minecraft.client.renderer.item.ItemProperties; import net.minecraft.world.item.Item; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.client.event.*; +import net.minecraftforge.client.model.DynamicFluidContainerModel; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; @@ -45,6 +49,9 @@ import com.eerussianguy.firmalife.common.misc.FLParticles; import com.eerussianguy.firmalife.common.items.FLFoodTraits; import com.eerussianguy.firmalife.common.items.FLItems; +import net.minecraftforge.registries.ForgeRegistries; + +import net.dries007.tfc.TerraFirmaCraft; import net.dries007.tfc.client.TFCColors; import net.dries007.tfc.client.particle.GlintParticleProvider; import net.dries007.tfc.common.capabilities.food.FoodCapability; @@ -134,6 +141,14 @@ public static void onItemColors(RegisterColorHandlersEvent.Item event) final ItemColor grassColor = (stack, tintIndex) -> TFCColors.getGrassColor(null, tintIndex); Stream.of(FLBlocks.BUTTERFLY_GRASS).forEach(reg -> event.register(grassColor, reg.get())); + + for (Fluid fluid : ForgeRegistries.FLUIDS.getValues()) + { + if (Objects.requireNonNull(ForgeRegistries.FLUIDS.getKey(fluid)).getNamespace().equals(FirmaLife.MOD_ID)) + { + event.register(new DynamicFluidContainerModel.Colors(), fluid.getBucket()); + } + } } public static void registerParticleFactories(RegisterParticleProvidersEvent event) diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index bda5a573..f88308d4 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -17,6 +17,11 @@ An addon for TFC. versionRange="[0,)" ordering="AFTER" side="BOTH" + [dependencies.firmalife.mc-publish] + ignore=false + modrinth="terrafirmacraft" + curseforge="terrafirmacraft" + [[dependencies.firmalife]] modId="forge" mandatory=true diff --git a/src/main/resources/data/firmalife/recipes/pot/beet_sugar.json b/src/main/resources/data/firmalife/recipes/pot/beet_sugar.json index b493e382..204f2dc5 100644 --- a/src/main/resources/data/firmalife/recipes/pot/beet_sugar.json +++ b/src/main/resources/data/firmalife/recipes/pot/beet_sugar.json @@ -35,7 +35,7 @@ ], "fluid_ingredient": { "ingredient": "tfc:salt_water", - "amount": 1000 + "amount": 100 }, "duration": 2000, "temperature": 300, diff --git a/src/main/resources/data/firmalife/recipes/pot/beet_sugar_freshwater.json b/src/main/resources/data/firmalife/recipes/pot/beet_sugar_freshwater.json new file mode 100644 index 00000000..94af7ac6 --- /dev/null +++ b/src/main/resources/data/firmalife/recipes/pot/beet_sugar_freshwater.json @@ -0,0 +1,47 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "type": "tfc:pot", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/beet" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/beet" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/beet" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/beet" + } + }, + { + "item": "tfc:powder/salt" + } + ], + "fluid_ingredient": { + "ingredient": "minecraft:water", + "amount": 100 + }, + "duration": 2000, + "temperature": 300, + "item_output": [ + { + "item": "minecraft:sugar" + }, + { + "item": "minecraft:sugar" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/firmalife/recipes/pot/cured_maize_1.json b/src/main/resources/data/firmalife/recipes/pot/cured_maize_1.json new file mode 100644 index 00000000..9688c1dd --- /dev/null +++ b/src/main/resources/data/firmalife/recipes/pot/cured_maize_1.json @@ -0,0 +1,23 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "type": "tfc:pot", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + } + ], + "fluid_ingredient": { + "ingredient": "tfc:limewater", + "amount": 100 + }, + "duration": 3000, + "temperature": 300, + "item_output": [ + { + "item": "firmalife:food/cured_maize" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/firmalife/recipes/pot/cured_maize_2.json b/src/main/resources/data/firmalife/recipes/pot/cured_maize_2.json new file mode 100644 index 00000000..7f2da28f --- /dev/null +++ b/src/main/resources/data/firmalife/recipes/pot/cured_maize_2.json @@ -0,0 +1,29 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "type": "tfc:pot", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + } + ], + "fluid_ingredient": { + "ingredient": "tfc:limewater", + "amount": 100 + }, + "duration": 3000, + "temperature": 300, + "item_output": [ + { + "item": "firmalife:food/cured_maize" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/firmalife/recipes/pot/cured_maize_3.json b/src/main/resources/data/firmalife/recipes/pot/cured_maize_3.json new file mode 100644 index 00000000..444463e6 --- /dev/null +++ b/src/main/resources/data/firmalife/recipes/pot/cured_maize_3.json @@ -0,0 +1,35 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "type": "tfc:pot", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + } + ], + "fluid_ingredient": { + "ingredient": "tfc:limewater", + "amount": 100 + }, + "duration": 3000, + "temperature": 300, + "item_output": [ + { + "item": "firmalife:food/cured_maize" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/firmalife/recipes/pot/cured_maize_4.json b/src/main/resources/data/firmalife/recipes/pot/cured_maize_4.json new file mode 100644 index 00000000..3f162198 --- /dev/null +++ b/src/main/resources/data/firmalife/recipes/pot/cured_maize_4.json @@ -0,0 +1,41 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "type": "tfc:pot", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + } + ], + "fluid_ingredient": { + "ingredient": "tfc:limewater", + "amount": 100 + }, + "duration": 3000, + "temperature": 300, + "item_output": [ + { + "item": "firmalife:food/cured_maize" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/firmalife/recipes/pot/cured_maize_5.json b/src/main/resources/data/firmalife/recipes/pot/cured_maize_5.json new file mode 100644 index 00000000..a2aa9d19 --- /dev/null +++ b/src/main/resources/data/firmalife/recipes/pot/cured_maize_5.json @@ -0,0 +1,47 @@ +{ + "__comment__": "This file was automatically created by mcresources", + "type": "tfc:pot", + "ingredients": [ + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + }, + { + "type": "tfc:not_rotten", + "ingredient": { + "item": "tfc:food/maize_grain" + } + } + ], + "fluid_ingredient": { + "ingredient": "tfc:limewater", + "amount": 100 + }, + "duration": 3000, + "temperature": 300, + "item_output": [ + { + "item": "firmalife:food/cured_maize" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/firmalife/recipes/pot/soy_mixture.json b/src/main/resources/data/firmalife/recipes/pot/soy_mixture.json index aaae0d16..164e0141 100644 --- a/src/main/resources/data/firmalife/recipes/pot/soy_mixture.json +++ b/src/main/resources/data/firmalife/recipes/pot/soy_mixture.json @@ -23,7 +23,7 @@ ], "fluid_ingredient": { "ingredient": "minecraft:water", - "amount": 1000 + "amount": 100 }, "duration": 2000, "temperature": 300, diff --git a/src/main/resources/data/firmalife/recipes/pot/tomato_sauce.json b/src/main/resources/data/firmalife/recipes/pot/tomato_sauce.json index 7e6f8c89..849c1dd6 100644 --- a/src/main/resources/data/firmalife/recipes/pot/tomato_sauce.json +++ b/src/main/resources/data/firmalife/recipes/pot/tomato_sauce.json @@ -20,7 +20,7 @@ ], "fluid_ingredient": { "ingredient": "minecraft:water", - "amount": 1000 + "amount": 100 }, "duration": 2000, "temperature": 300,