Skip to content

Commit

Permalink
make most pot recipes requires 100mb, allow making cured maize with 1…
Browse files Browse the repository at this point in the history
…-5 grains instead of only 1, add freshwater beet sugar recipe, improve dependency for tfc to hopefully appear correctly on modrinth
  • Loading branch information
eerussianguy committed Dec 29, 2023
1 parent 9a7de27 commit ab17d7f
Show file tree
Hide file tree
Showing 13 changed files with 255 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
13 changes: 9 additions & 4 deletions resources/recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
"fluid_ingredient": {
"ingredient": "tfc:salt_water",
"amount": 1000
"amount": 100
},
"duration": 2000,
"temperature": 300,
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
23 changes: 23 additions & 0 deletions src/main/resources/data/firmalife/recipes/pot/cured_maize_1.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
29 changes: 29 additions & 0 deletions src/main/resources/data/firmalife/recipes/pot/cured_maize_2.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
35 changes: 35 additions & 0 deletions src/main/resources/data/firmalife/recipes/pot/cured_maize_3.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
41 changes: 41 additions & 0 deletions src/main/resources/data/firmalife/recipes/pot/cured_maize_4.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
47 changes: 47 additions & 0 deletions src/main/resources/data/firmalife/recipes/pot/cured_maize_5.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"fluid_ingredient": {
"ingredient": "minecraft:water",
"amount": 1000
"amount": 100
},
"duration": 2000,
"temperature": 300,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"fluid_ingredient": {
"ingredient": "minecraft:water",
"amount": 1000
"amount": 100
},
"duration": 2000,
"temperature": 300,
Expand Down

0 comments on commit ab17d7f

Please sign in to comment.