diff --git a/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front.png b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front.png new file mode 100644 index 000000000..de1abfe72 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active.png b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active.png new file mode 100644 index 000000000..5b9e6ea67 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active_emissive.png b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active_emissive.png new file mode 100644 index 000000000..4da155317 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active_emissive.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_emissive.png b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_emissive.png new file mode 100644 index 000000000..c20a1c981 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_emissive.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back.png new file mode 100644 index 000000000..f02154247 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png new file mode 100644 index 000000000..f02154247 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png.mcmeta b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png.mcmeta new file mode 100644 index 000000000..dfae8cae1 --- /dev/null +++ b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":1 + } +} \ No newline at end of file diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front.png new file mode 100644 index 000000000..5bd5b3654 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png new file mode 100644 index 000000000..9214428f2 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png.mcmeta b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png.mcmeta new file mode 100644 index 000000000..f3da053bc --- /dev/null +++ b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime": 2 + } +} \ No newline at end of file diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side.png new file mode 100644 index 000000000..678e1b9bb Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png new file mode 100644 index 000000000..f2b3c4212 Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png.mcmeta b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png.mcmeta new file mode 100644 index 000000000..f3da053bc --- /dev/null +++ b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime": 2 + } +} \ No newline at end of file diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top.png new file mode 100644 index 000000000..92bda3a2b Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png new file mode 100644 index 000000000..9b68d6c3e Binary files /dev/null and b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png differ diff --git a/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png.mcmeta b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png.mcmeta new file mode 100644 index 000000000..f3da053bc --- /dev/null +++ b/kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime": 2 + } +} \ No newline at end of file diff --git a/kubejs/server_scripts/gregtech/recipes.machines.js b/kubejs/server_scripts/gregtech/recipes.machines.js index 83c352ad9..338d49a76 100644 --- a/kubejs/server_scripts/gregtech/recipes.machines.js +++ b/kubejs/server_scripts/gregtech/recipes.machines.js @@ -745,7 +745,7 @@ function registerGTCEuMachineRecipes(event) { // #endregion // Контроллер теплицы - event.shaped('gtceu:greenhouse', [ + event.shaped('tfg:electric_greenhouse', [ 'ABA', 'CDC', 'BCB' diff --git a/kubejs/server_scripts/tfg/recipes.food.js b/kubejs/server_scripts/tfg/recipes.food.js index d88c10d10..eaf7afd06 100644 --- a/kubejs/server_scripts/tfg/recipes.food.js +++ b/kubejs/server_scripts/tfg/recipes.food.js @@ -1,129 +1,186 @@ // priority: 0 +/** + * + * @param {Internal.RecipesEventJS} event + */ + function registerTFGFoodRecipes(event) { + /** + * @param {Internal.Ingredient} ingredient + */ + const NotRotten = (ingredient) => TFC.ingredient.notRotten(ingredient) + + const $ISPRecipeLogic = Java.loadClass("su.terrafirmagreg.core.common.data.machines.ISPOutputRecipeLogic") + const $SizedIngredient = Java.loadClass("com.gregtechceu.gtceu.api.recipe.ingredient.SizedIngredient") + + const Sized = (ing, amount) => $SizedIngredient.create(ing, amount) + + + /** + * @typedef {Object} FoodRecipeData + * @property {number?} circuit + * @property {number} duration + * @property {number} EUt + * @property {Internal.GTRecipeComponents$FluidIngredientJS_[]?} fluidInputs Fluid inputs behave normally + * @property {Internal.FluidStackJS[]?} fluidOutputs Fluid outputs behave normally + * @property {string[]?} itemInputHints Array of simple ingredients, used internally within gregtech. [NOT ACTUAL INPUTS] + * @property {string?} itemOutputHint Simple ingredient output, used internally within gregtech. [NOT ACTUAL OUTPUT] + * @property {Ingredient[]?} itemInputs Array of ingredients used when running a recipe. + * @property {Internal.ItemStackProviderJS?} itemOutputProvider ItemStackProvider which provides the recipe output. + */ + + /** + * **NOTE:** TFC Ingredients do not support item counts higher than 1. Do `Sized(TFCIngredient('item:item'), count)` instead of `TFCIngredient('[count]x item:item')` + * + * @param {"food_oven"|"food_processor"} type The recipe type + * @param {string} id The recipe id + * @param {FoodRecipeData} data Recipe data + */ + function registerFoodRecipe(type, id, data) { + if (data.fluidInputs === undefined) data.fluidInputs = [] + if (data.fluidOutputs === undefined) data.fluidOutputs = [] + if (data.itemInputHints === undefined) data.itemInputHints = [] + if (data.itemInputs === undefined) data.itemInputs = [] + + if ((data.itemOutputProvider === undefined && data.itemOutputHint !== undefined) || (data.itemOutputHint === undefined && data.itemOutputProvider !== undefined)) { + return console.error(`Invalid recipe ${type}[${id}]: itemOutputProvider & itemOutputHint do not match`) + } + if (data.itemOutputHint === undefined && data.fluidOutputs.length === 0) return console.error(`Invalid recipe ${type}[${id}]: No outputs`) + if (data.itemInputHints.length === 0 && data.fluidInputs.length === 0) return console.error(`Invalid recipe ${type}[${id}]: No inputs`) + if (data.itemInputHints.length !== data.itemInputs.length) return console.error(`Invalid recipe ${type}[${id}]: itemInputHints.length !== itemInputs.length`) + + for (let index = 0; index < data.itemInputs; index++) { + if (typeof data.itemInputs[index] === "string") data.itemInputs[index] = Ingredient.of(data.itemInputs[index]); + } + + $ISPRecipeLogic.RegisterRecipeData(type + "/" + id, data.itemInputs, (data.itemOutputProvider === undefined) ? null : data.itemOutputProvider.asCanonClass()) + + let r = event.recipes.gtceu[type](id) + .duration(data.duration) + .EUt(data.EUt) + + if (data.circuit) r.circuit(data.circuit) + if (data.itemOutputHint) r.itemOutputs(data.itemOutputHint) + if (data.itemInputHints.length > 0) r.itemInputs(data.itemInputHints) + if (data.fluidInputs.length > 0) r.inputFluids(data.fluidInputs); + if (data.fluidOutputs.length > 0) r.outputFluids(data.fluidOutputs); + } + //#region ================= Meat cooking ================= + + global.TFC_MEAT_RECIPE_COMPONENTS.forEach(item => { - global.TFC_FURNACE_MEAT_RECIPE_COMPONENTS.forEach(item => { - - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyFood().addTrait('firmalife:oven_baked') - ) - - event.recipes.gtceu.electric_oven(item.name) - .itemInputs(item.input) - .itemOutputs(item.output) - .duration(300) - .EUt(16) + registerFoodRecipe("food_oven", item.name, { + duration: 300, + EUt: 16, + itemInputHints: [item.input], + itemOutputHint: item.output, + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).copyFood().addTrait("firmalife:oven_baked") + }) }) //#endregion //#region ================= Cutting grains ================= global.TFC_QUERN_GRAIN_RECIPE_COMPONENTS.forEach(item => { - - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyFood() - ) - - event.recipes.gtceu.food_processor(item.name) - .itemInputs(item.input) - .itemOutputs(item.output) - .duration(100) - .EUt(2) + registerFoodRecipe("food_processor", item.name, { + duration: 100, + EUt: 2, + itemInputHints: [item.input], + itemOutputHint: item.output, + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).copyOldestFood() + }) }) //#endregion //#region ================= Grains to flour ================= global.TFC_QUERN_FLOUR_RECIPE_COMPONENTS.forEach(item => { - - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyFood() - ) - - event.recipes.gtceu.food_processor(item.name) - .itemInputs(item.input) - .itemOutputs(item.output) - .duration(100) - .EUt(2) + registerFoodRecipe("food_processor", item.name, { + duration: 100, + EUt: 2, + itemInputHints: [item.input], + itemOutputHint: item.output, + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).copyOldestFood() + }) + }) - global.FIRMALIFE_QUERN_FLOUR_RECIPE_COMPONENTS.forEach(item => { + // global.FIRMALIFE_QUERN_FLOUR_RECIPE_COMPONENTS.forEach(item => { - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyFood() - ) + // registerTFCRecipeProperties("food_processor/" + item.name, + // [ NotRotten(item.input) ], + // TFC.isp.of(item.output).copyFood() + // ) - event.recipes.gtceu.food_processor(item.name) - .itemInputs(item.input) - .itemOutputs(item.output) - .duration(100) - .EUt(2) - }) + // event.recipes.gtceu.food_processor(item.name) + // .itemInputs(item.input) + // .itemOutputs(item.output) + // .duration(100) + // .EUt(2) + // }) //#endregion //#region ================= Dough ================= global.TFC_MIXER_FLATBREAD_DOUGH_RECIPE_COMPONENTS.forEach(item => { - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyOldestFood() - ) - event.recipes.gtceu.food_processor(item.name) - .itemInputs(item.input) - .inputFluids(Fluid.of('minecraft:water', 100)) - .itemOutputs(item.output) - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", item.name, { + duration: 300, + EUt: 2, + itemInputHints: [item.input], + itemOutputHint: item.output, + fluidInputs: [Fluid.of('minecraft:water', 100)], + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).copyFood() + }) + }) global.FIRMALIFE_MIXER_FLATBREAD_DOUGH_RECIPE_COMPONENTS.forEach(item => { - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyOldestFood() - ) - event.recipes.gtceu.food_processor(item.name) - .itemInputs(item.input) - .inputFluids(Fluid.of('minecraft:water', 100)) - .itemOutputs(item.output) - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", item.name, { + duration: 300, + EUt: 2, + itemInputHints: [item.input], + itemOutputHint: item.output, + fluidInputs: [Fluid.of('minecraft:water', 100)], + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).copyFood() + }) }) //#endregion //#region ================= Baking bread ================= global.TFC_FURNACE_BREAD_RECIPE_COMPONENTS.forEach(item => { - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyFood().addTrait('firmalife:oven_baked') - ) - event.recipes.gtceu.electric_oven(item.name) - .itemInputs(item.input) - .itemOutputs(item.output) - .duration(300) - .EUt(16) + registerFoodRecipe("food_oven", item.name, { + duration: 300, + EUt: 16, + itemInputHints: [item.input], + itemOutputHint: item.output, + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).copyFood().addTrait("firmalife:oven_baked") + }) + }) global.FIRMALIFE_FURNACE_FLATBREAD_RECIPE_COMPONENTS.forEach(item => { - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).copyFood().addTrait('firmalife:oven_baked') - ) - event.recipes.gtceu.electric_oven(item.name) - .itemInputs(item.input) - .itemOutputs(item.output) - .duration(300) - .EUt(16) + registerFoodRecipe("food_oven", item.name, { + duration: 300, + EUt: 16, + itemInputHints: [item.input], + itemOutputHint: item.output, + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).copyFood().addTrait("firmalife:oven_baked") + }) }) //#endregion @@ -131,16 +188,14 @@ function registerTFGFoodRecipes(event) { global.FIRMALIFE_COOKING_RECIPE_COMPONENTS.forEach(item => { - registerTFCRecipeProperties(item.name, - [ TFC.ingredient.notRotten(item.input) ], - TFC.isp.of(item.output).firmaLifeCopyDynamicFood() - ) - - event.recipes.gtceu.electric_oven(item.name) - .itemInputs(item.input) - .itemOutputs(item.output) - .duration(300) - .EUt(16) + registerFoodRecipe("food_oven", item.name, { + duration: 300, + EUt: 16, + itemInputHints: [item.input], + itemOutputHint: item.output, + itemInputs: [NotRotten(item.input)], + itemOutputProvider: TFC.isp.of(item.output).firmaLifeCopyDynamicFood() + }) }) //#endregion @@ -148,417 +203,368 @@ function registerTFGFoodRecipes(event) { global.TFC_CURDS_AND_CHEESES.forEach(item => { - // Curds - registerTFCRecipeProperties(`${item.id}_curd`, - [], TFC.isp.of(item.curd).resetFood() - ) + registerFoodRecipe("food_processor", `${item.curd}_curd`, { + duration: 1200, + EUt: 16, + itemOutputHint: item.curd, + fluidInputs: [Fluid.of(item.input_fluid, 1000)], + itemInputs: [], + itemOutputProvider: TFC.isp.of(item.curd).resetFood() + }) - event.recipes.gtceu.food_processor(`${item.id}_curd`) - .inputFluids(Fluid.of(item.input_fluid, 1000)) - .itemOutputs(item.curd) - .duration(1200) - .EUt(16) + registerFoodRecipe("food_processor", `${item.cheese1}_cheese_wheel_1`, { + duration: 8000, + EUt: 16, + itemInputHints: [`3x ${item.curd}`], + itemOutputHint: `firmalife:${item.cheese1}_wheel`, + fluidInputs: [Fluid.of('tfc:salt_water', 750)], + itemInputs: [ Sized(NotRotten(item.curd),3) ], + itemOutputProvider: TFC.isp.of(`firmalife:${item.cheese1}_wheel`).copyOldestFood() + }) - // Sealed barrel cheese wheels - registerTFCRecipeProperties(`${item.id}_cheese_wheel_1`, - [ TFC.ingredient.notRotten(item.curd) ], - TFC.isp.of(`firmalife:${item.cheese1}_wheel`).copyOldestFood() - ) + registerFoodRecipe("food_processor", `${item.cheese2}_cheese_wheel_2`, { + circuit: 2, + duration: 1000, + EUt: 16, + itemInputHints: [`6x ${item.curd}`, `3x tfc:powder/salt`], + itemOutputHint: `firmalife:${item.cheese2}_wheel`, + itemInputs: [ Sized(NotRotten(item.curd), 6), Sized(Ingredient.of("tfc:powder/salt"), 3) ], + itemOutputProvider: TFC.isp.of(`firmalife:${item.cheese2}_wheel`).copyOldestFood() + }) - event.recipes.gtceu.food_processor(`${item.id}_cheese_wheel_1`) - .itemInputs(Item.of(item.curd, 3)) - .inputFluids(Fluid.of('tfc:salt_water', 750)) - .itemOutputs(`firmalife:${item.cheese1}_wheel`) - .circuit(1) - .duration(8000) - .EUt(16) + registerFoodRecipe("food_processor", `${item.cheese1}_cheese_cutting_1`, { + duration: 100, + EUt: 8, + itemInputHints: [`firmalife:${item.cheese1}_wheel`], + itemOutputHint: `4x firmalife:food/${item.cheese1}`, + itemInputs: [ NotRotten(`firmalife:${item.cheese1}_wheel`) ], + itemOutputProvider: TFC.isp.of(`4x firmalife:food/${item.cheese1}`).copyOldestFood() + }) - // Crafting table cheese wheels - registerTFCRecipeProperties(`${item.id}_cheese_wheel_2`, - [ TFC.ingredient.notRotten(item.curd) ], - TFC.isp.of(`firmalife:${item.cheese2}_wheel`).copyOldestFood() - ) + registerFoodRecipe("food_processor", `${item.cheese2}_cheese_cutting_2`, { + duration: 100, + EUt: 8, + itemInputHints: [`firmalife:${item.cheese2}_wheel`], + itemOutputHint: `4x firmalife:food/${item.cheese2}`, + itemInputs: [ NotRotten(`firmalife:${item.cheese2}_wheel`) ], + itemOutputProvider: TFC.isp.of(`4x firmalife:food/${item.cheese2}`).copyOldestFood() + }) - event.recipes.gtceu.food_processor(`${item.id}_cheese_wheel_2`) - .itemInputs(Item.of(item.curd, 6), '3x tfc:powder/salt') - .itemOutputs(`firmalife:${item.cheese2}_wheel`) - .circuit(2) - .duration(300) - .EUt(16) - - // Cheese cutting - registerTFCRecipeProperties(`${item.cheese1}_cheese_cutting_1`, - [ TFC.ingredient.notRotten(`firmalife:${item.cheese1}_wheel`) ], - TFC.isp.of(`firmalife:food/${item.cheese1}`).copyOldestFood() - ) - - event.recipes.gtceu.food_processor(`${item.cheese1}_cheese_cutting_1`) - .itemInputs(`firmalife:${item.cheese1}_wheel`) - .itemOutputs(`4x firmalife:food/${item.cheese1}`) - .duration(100) - .EUt(7) - - registerTFCRecipeProperties(`${item.cheese2}_cheese_cutting_2`, - [ TFC.ingredient.notRotten(`firmalife:${item.cheese2}_wheel`) ], - TFC.isp.of(`firmalife:food/${item.cheese2}`).copyOldestFood() - ) - - event.recipes.gtceu.food_processor(`${item.cheese2}_cheese_cutting_2`) - .itemInputs(`firmalife:${item.cheese2}_wheel`) - .itemOutputs(`4x firmalife:food/${item.cheese2}`) - .duration(100) - .EUt(7) }) - // White Chocolate Blend - registerTFCRecipeProperties(`white_chocolate_blend`, - [ TFC.ingredient.notRotten('firmalife:food/cocoa_butter') ], - TFC.isp.of('firmalife:food/white_chocolate_blend').copyOldestFood()) + registerFoodRecipe("food_processor", `white_chocolate_blend`, { + circuit: 1, + duration: 300, + EUt: 16, + itemInputHints: ['2x firmalife:food/cocoa_butter', '#tfc:sweetener'], + itemOutputHint: '2x firmalife:food/white_chocolate_blend', + fluidInputs: [Fluid.of('#tfc:milks', 1000)], + itemInputs: [ Sized(NotRotten("firmalife:food/cocoa_butter"), 2), "#tfc:sweetener"], + itemOutputProvider: TFC.isp.of('2x firmalife:food/white_chocolate_blend').resetFood(), + }) - event.recipes.gtceu.food_processor(`white_chocolate_blend`) - .itemInputs('2x firmalife:food/cocoa_butter', '#tfc:sweetener') - .inputFluids(Fluid.of('#tfc:milks', 1000)) - .itemOutputs('2x firmalife:food/white_chocolate_blend') - .circuit(1) - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", `dark_chocolate_blend`, { + circuit: 1, + duration: 300, + EUt: 16, + itemInputHints: ['2x firmalife:food/cocoa_powder', '#tfc:sweetener'], + itemOutputHint: '2x firmalife:food/dark_chocolate_blend', + fluidInputs: [Fluid.of('#tfc:milks', 1000)], + itemInputs: [ Sized(NotRotten("firmalife:food/cocoa_powder"), 2), "#tfc:sweetener"], + itemOutputProvider: TFC.isp.of('2x firmalife:food/dark_chocolate_blend').resetFood(), + }) - // Dark Chocolate Blend - registerTFCRecipeProperties(`dark_chocolate_blend`, - [], TFC.isp.of('firmalife:food/dark_chocolate_blend').resetFood()) - - event.recipes.gtceu.food_processor(`dark_chocolate_blend`) - .itemInputs('2x firmalife:food/cocoa_powder', '#tfc:sweetener') - .inputFluids(Fluid.of('#tfc:milks', 1000)) - .itemOutputs('2x firmalife:food/dark_chocolate_blend') - .circuit(1) - .duration(300) - .EUt(16) - - // Milk Chocolate Blend - registerTFCRecipeProperties(`milk_chocolate_blend`, - [ TFC.ingredient.notRotten('firmalife:food/cocoa_butter') ], - TFC.isp.of('firmalife:food/milk_chocolate_blend').copyOldestFood()) - - event.recipes.gtceu.food_processor(`milk_chocolate_blend`) - .itemInputs('firmalife:food/cocoa_powder', 'firmalife:food/cocoa_butter', '#tfc:sweetener') - .inputFluids(Fluid.of('#tfc:milks', 1000)) - .itemOutputs('2x firmalife:food/milk_chocolate_blend') - .circuit(2) - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", `milk_chocolate_blend`, { + circuit: 2, + duration: 300, + EUt: 16, + itemInputHints: ['firmalife:food/cocoa_powder', 'firmalife:food/cocoa_butter', '#tfc:sweetener'], + itemOutputHint: '2x firmalife:food/milk_chocolate_blend', + fluidInputs: [Fluid.of('#tfc:milks', 1000)], + itemInputs: [ NotRotten("firmalife:food/cocoa_powder"), NotRotten('firmalife:food/cocoa_butter'), "#tfc:sweetener"], + itemOutputProvider: TFC.isp.of('2x firmalife:food/milk_chocolate_blend').resetFood(), + }) //#endregion //#region ================= Misc ================= - registerTFCRecipeProperties('tomato_sauce', - [ TFC.ingredient.notRotten('tfc:food/tomato'), TFC.ingredient.notRotten('tfc:food/garlic') ], - TFC.isp.of('firmalife:food/tomato_sauce').copyOldestFood()) - - event.recipes.gtceu.food_processor('tomato_sauce') - .itemInputs('tfc:food/tomato', 'tfc:powder/salt', 'tfc:food/garlic') - .inputFluids(Fluid.of('minecraft:water', 100)) - .itemOutputs('5x firmalife:food/tomato_sauce') - .duration(2000) - .EUt(7) - - registerTFCRecipeProperties('tomato_sauce_from_mix', - [ TFC.ingredient.notRotten("firmalife:food/tomato_sauce_mix") ], - TFC.isp.of('firmalife:food/tomato_sauce').copyOldestFood()) - - event.recipes.gtceu.food_processor('tomato_sauce_from_mix') - .itemInputs("firmalife:food/tomato_sauce_mix") - .inputFluids(Fluid.of('minecraft:water', 200)) - .itemOutputs('firmalife:food/tomato_sauce') - .duration(200) - .EUt(7) - - registerTFCRecipeProperties('olive_paste', - [ TFC.ingredient.notRotten('tfc:food/olive') ]) - - event.recipes.gtceu.food_processor(`olive_paste`) - .itemInputs('tfc:food/olive') - .itemOutputs('2x tfc:olive_paste') - .duration(60) - .EUt(2) - - registerTFCRecipeProperties('soybean_paste', - [ TFC.ingredient.notRotten('tfc:food/soybean') ]) - - event.recipes.gtceu.food_processor(`soybean_paste`) - .itemInputs('tfc:food/soybean') - .itemOutputs('2x firmalife:soybean_paste') - .duration(60) - .EUt(2) - - // Vinegar - global.TFC_ALCOHOL.forEach(alcohol => { - let name = `vinegar/${alcohol.id.replace(':', '_')}`; - - registerTFCRecipeProperties(name, - [ TFC.ingredient.notRotten('#tfc:foods/fruits') ]) - - event.recipes.gtceu.food_processor(name) - .itemInputs('#tfc:foods/fruits') - .inputFluids(Fluid.of(alcohol.id, 250)) - .outputFluids(Fluid.of('tfc:vinegar', 250)) - .circuit(5) - .duration(600) - .EUt(28) + registerFoodRecipe("food_processor", "food_salting", { + duration: 10, + EUt: 16, + itemInputHints: ["#tfc:foods/can_be_salted", "tfc:powder/salt"], + itemOutputHint: "#tfc:foods/can_be_salted", + itemInputs: [TFC.ingredient.lacksTrait(NotRotten("#tfc:foods/can_be_salted"), "tfc:salted"), "tfc:powder/salt"], + itemOutputProvider: TFC.isp.copyInput().addTrait("tfc:salted") }) - // Pizzas - registerTFCRecipeProperties('pizza_dough_olive_oil', - [ TFC.ingredient.notRotten('#tfc:foods/dough') ], - TFC.isp.of('firmalife:food/pizza_dough').copyOldestFood()) + registerFoodRecipe("food_processor", "tomato_sauce", { + duration: 2000, + EUt: 8, + itemInputHints: ['tfc:food/tomato', 'tfc:powder/salt', 'tfc:food/garlic'], + itemOutputHint: '5x firmalife:food/tomato_sauce', + fluidInputs: [Fluid.of('minecraft:water', 100)], + itemInputs: [NotRotten('tfc:food/tomato'), NotRotten('tfc:food/garlic'), "tfc:powder/salt"], + itemOutputProvider: TFC.isp.of('firmalife:food/tomato_sauce').copyOldestFood(), + }) - event.recipes.gtceu.food_processor('pizza_dough_olive_oil') - .itemInputs('firmalife:spice/basil_leaves', '#tfc:foods/dough', 'tfc:powder/salt') - .inputFluids(Fluid.of('tfc:olive_oil', 1000)) - .itemOutputs('4x firmalife:food/pizza_dough') - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", "tomato_sauce_from_mix", { + duration: 200, + EUt: 8, + itemInputHints: ['firmalife:food/tomato_sauce_mix'], + itemOutputHint: 'firmalife:food/tomato_sauce', + fluidInputs: [Fluid.of('minecraft:water', 200)], + itemInputs: [NotRotten("firmalife:food/tomato_sauce_mix")], + itemOutputProvider: TFC.isp.of('firmalife:food/tomato_sauce').copyOldestFood(), + }) - registerTFCRecipeProperties('pizza_dough_soybean_oil', - [ TFC.ingredient.notRotten('#tfc:foods/dough') ], - TFC.isp.of('firmalife:food/pizza_dough').copyOldestFood()) + registerFoodRecipe("food_processor", "olive_paste", { + duration: 60, + EUt: 8, + itemInputHints: ['tfc:food/olive'], + itemOutputHint: '2x tfc:olive_paste', + itemInputs: [NotRotten('tfc:food/olive')], + itemOutputProvider: TFC.isp.of('2x tfc:olive_paste'), + }) - event.recipes.gtceu.food_processor('pizza_dough_soybean_oil') - .itemInputs('firmalife:spice/basil_leaves', '#tfc:foods/dough', 'tfc:powder/salt') - .inputFluids(Fluid.of('firmalife:soybean_oil', 1000)) - .itemOutputs('4x firmalife:food/pizza_dough') - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", "soybean_paste", { + duration: 60, + EUt: 8, + itemInputHints: ['tfc:food/soybean'], + itemOutputHint: '2x tfc:soybean_paste', + itemInputs: [NotRotten('tfc:food/soybean')], + itemOutputProvider: TFC.isp.of('2x tfc:soybean_paste'), + }) + + // Vinegar + global.TFC_ALCOHOL.forEach(alcohol => { + let name = `vinegar_${alcohol.id.replace(':', '_')}`; - // Ice Cream - registerTFCRecipeProperties('vanilla_ice_cream', - [], TFC.isp.of('firmalife:food/vanilla_ice_cream').resetFood()) + registerFoodRecipe("food_processor", name, { + circuit: 5, + duration: 600, + EUt: 32, + itemInputHints: ['#tfc:foods/fruits'], + fluidInputs: [Fluid.of(alcohol.id, 250)], + fluidOutputs: [Fluid.of('tfc:vinegar', 250)], + }) - event.recipes.gtceu.food_processor('vanilla_ice_cream') - .itemInputs('firmalife:ice_shavings', '#tfc:sweetener', 'firmalife:spice/vanilla') - .inputFluids(Fluid.of('firmalife:cream', 1000)) - .itemOutputs('2x firmalife:food/vanilla_ice_cream') - .duration(300) - .EUt(16) + }) - registerTFCRecipeProperties('chocolate_ice_cream', - [ TFC.ingredient.notRotten('firmalife:food/vanilla_ice_cream') ], - TFC.isp.of('firmalife:food/chocolate_ice_cream').copyOldestFood()) + registerFoodRecipe("food_processor", "pizza_dough_olive_oil", { + duration: 300, + EUt: 16, + itemInputHints: ['firmalife:spice/basil_leaves', '#tfc:foods/dough', 'tfc:powder/salt'], + itemOutputHint: '4x firmalife:food/pizza_dough', + fluidInputs: [Fluid.of('tfc:olive_oil', 1000)], + itemInputs: ["firmalife:spice/basil_leaves", NotRotten("#tfc:foods/dough"), "tfc:powder/salt"], + itemOutputProvider: TFC.isp.of("4x firmalife:food/pizza_dough").copyOldestFood() + }) - event.recipes.gtceu.food_processor('chocolate_ice_cream') - .itemInputs('firmalife:food/vanilla_ice_cream') - .inputFluids(Fluid.of('firmalife:chocolate', 1000)) - .itemOutputs('firmalife:food/chocolate_ice_cream') - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", "pizza_dough_soybean_oil", { + duration: 300, + EUt: 16, + itemInputHints: ['firmalife:spice/basil_leaves', '#tfc:foods/dough', 'tfc:powder/salt'], + itemOutputHint: '4x firmalife:food/pizza_dough', + fluidInputs: [Fluid.of('firmalife:soybean_oil', 1000)], + itemInputs: ["firmalife:spice/basil_leaves", NotRotten("#tfc:foods/dough"), "tfc:powder/salt"], + itemOutputProvider: TFC.isp.of("4x firmalife:food/pizza_dough").copyOldestFood() + }) - registerTFCRecipeProperties('strawberry_ice_cream', - [ TFC.ingredient.notRotten('firmalife:food/vanilla_ice_cream'), TFC.ingredient.notRotten('tfc:food/strawberry') ], - TFC.isp.of('firmalife:food/strawberry_ice_cream').copyOldestFood()) + registerFoodRecipe("food_processor", "vanilla_ice_cream", { + duration: 300, + EUt: 16, + itemInputHints: ['firmalife:ice_shavings', '#tfc:sweetener', 'firmalife:spice/vanilla'], + itemOutputHint: '2x firmalife:food/vanilla_ice_cream', + fluidInputs: [Fluid.of('firmalife:cream', 1000)], + itemInputs: ['firmalife:ice_shavings', '#tfc:sweetener', 'firmalife:spice/vanilla'], + itemOutputProvider: TFC.isp.of("2x firmalife:food/vanilla_ice_cream").resetFood() + }) - event.recipes.gtceu.food_processor('strawberry_ice_cream') - .itemInputs('firmalife:food/vanilla_ice_cream', '2x tfc:food/strawberry') - .itemOutputs('firmalife:food/strawberry_ice_cream') - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", "chocolate_ice_cream", { + duration: 300, + EUt: 16, + itemInputHints: ['firmalife:food/vanilla_ice_cream'], + itemOutputHint: 'firmalife:food/chocolate_ice_cream', + fluidInputs: [Fluid.of('firmalife:chocolate', 1000)], + itemInputs: [NotRotten('firmalife:food/vanilla_ice_cream')], + itemOutputProvider: TFC.isp.of("firmalife:food/chocolate_ice_cream").resetFood() + }) - // Butter - registerTFCRecipeProperties('butter', - [], TFC.isp.of('firmalife:food/butter').resetFood()) + registerFoodRecipe("food_processor", "strawberry_ice_cream", { + duration: 300, + EUt: 16, + itemInputHints: ['firmalife:food/vanilla_ice_cream', 'firmalife:food/vanilla_ice_cream', '2x tfc:food/strawberry'], + itemOutputHint: 'firmalife:food/strawberry_ice_cream', + itemInputs: [NotRotten('firmalife:food/vanilla_ice_cream'), Sized(NotRotten("tfc:food/strawberry"), 2)], + itemOutputProvider: TFC.isp.of("firmalife:food/strawberry_ice_cream").resetFood() + }) - event.recipes.gtceu.food_processor('butter') - .itemInputs('tfc:powder/salt') - .inputFluids(Fluid.of('firmalife:cream', 1000)) - .itemOutputs('firmalife:food/butter') - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", "butter", { + duration: 300, + EUt: 16, + itemInputHints: ["tfc:powder/salt"], + itemOutputHint: "firmalife:food/buffer", + fluidInputs: [Fluid.of('firmalife:cream', 1000)], + itemInputs: ["tfc:powder/salt"], + itemOutputProvider: TFC.isp.of('firmalife:food/butter').resetFood() + }) - // Pie Dough - registerTFCRecipeProperties('pie_dough', - [ TFC.ingredient.notRotten('firmalife:food/butter'), TFC.ingredient.notRotten('#tfc:foods/flour') ], - TFC.isp.of('firmalife:food/pie_dough').copyOldestFood()) + registerFoodRecipe("food_processor", "pie_dough", { + circuit: 2, + duration: 300, + EUt: 16, + itemInputHints: ['#tfc:sweetener', 'firmalife:food/butter', '#tfc:foods/flour'], + itemOutputHint: 'firmalife:food/pie_dough', + fluidInputs: [Fluid.of('minecraft:water', 1000)], + itemInputs: [NotRotten('firmalife:food/butter'), NotRotten('#tfc:foods/flour'), "#tfc:sweetener"], + itemOutputProvider: TFC.isp.of('firmalife:food/pie_dough').copyOldestFood() + }) - event.recipes.gtceu.food_processor('pie_dough') - .itemInputs('#tfc:sweetener', 'firmalife:food/butter', '#tfc:foods/flour') - .inputFluids(Fluid.of('minecraft:water', 1000)) - .itemOutputs('firmalife:food/pie_dough') - .duration(300) - .EUt(16) - .circuit(2) + registerFoodRecipe("food_processor", "pumpkin_pie_dough", { + circuit: 2, + duration: 300, + EUt: 16, + itemInputHints: ['#tfc:sweetener', '#forge:eggs', '2x tfc:food/pumpkin_chunks', '#tfc:foods/flour'], + itemOutputHint: 'firmalife:food/pumpkin_pie_dough', + fluidInputs: [Fluid.of('minecraft:water', 1000)], + itemInputs: ['#tfc:sweetener', NotRotten('#forge:eggs'), Sized(NotRotten('tfc:food/pumpkin_chunks'), 2), NotRotten('#tfc:foods/flour')], + itemOutputProvider: TFC.isp.of('firmalife:food/pumpkin_pie_dough').copyOldestFood() + }) - // Pumpkin Pie Dough - registerTFCRecipeProperties('pumpkin_pie_dough', - [ TFC.ingredient.notRotten('#forge:eggs'), TFC.ingredient.notRotten('tfc:food/pumpkin_chunks'), TFC.ingredient.notRotten('#tfc:foods/flour') ], - TFC.isp.of('firmalife:food/pumpkin_pie_dough').copyOldestFood()) + registerFoodRecipe("food_processor", "cookie_dough", { + duration: 300, + EUt: 16, + itemInputHints: ['#tfc:sweetener', '#forge:eggs', 'firmalife:food/butter', '#tfc:foods/flour', "firmalife:spice/vanilla"], + itemOutputHint: '4x firmalife:food/cookie_dough', + itemInputs: ['firmalife:spice/vanilla', '#tfc:sweetener', NotRotten('firmalife:food/butter'), NotRotten('#tfc:foods/flour'), NotRotten('#forge:eggs')], + itemOutputProvider: TFC.isp.of('4x firmalife:food/cookie_dough').copyOldestFood() + }) - event.recipes.gtceu.food_processor('pumpkin_pie_dough') - .itemInputs('#tfc:sweetener', '#forge:eggs', '2x tfc:food/pumpkin_chunks', '#tfc:foods/flour') - .inputFluids(Fluid.of('minecraft:water', 1000)) - .itemOutputs('firmalife:food/pumpkin_pie_dough') - .duration(300) - .EUt(16) - .circuit(2) + registerFoodRecipe("food_processor", "chocolate_chip_cookie_dough", { + duration: 300, + EUt: 16, + itemInputHints: ['4x firmalife:food/cookie_dough', '#firmalife:chocolate_blends'], + itemOutputHint: '4x firmalife:food/chocolate_chip_cookie_dough', + itemInputs: [Sized(NotRotten('firmalife:food/cookie_dough'), 4), NotRotten('#firmalife:chocolate_blends')], + itemOutputProvider: TFC.isp.of('4x firmalife:food/chocolate_chip_cookie_dough').copyOldestFood() + }) - // Cookie Dough - registerTFCRecipeProperties('cookie_dough', - [ TFC.ingredient.notRotten('firmalife:food/butter'), TFC.ingredient.notRotten('#tfc:foods/flour'), TFC.ingredient.notRotten('#forge:eggs') ], - TFC.isp.of('4x firmalife:food/cookie_dough').copyOldestFood()) + registerFoodRecipe("food_processor", "hardtack_dough", { + duration: 300, + EUt: 16, + itemInputHints: ['tfc:powder/salt', '#tfc:foods/flour'], + itemOutputHint: '4x firmalife:food/hardtack_dough', + fluidInputs: [Fluid.of('minecraft:water', 1000)], + itemInputs: [NotRotten('#tfc:foods/flour'), "tfc:powder/salt"], + itemOutputProvider: TFC.isp.of('4x firmalife:food/hardtack_dough').copyOldestFood() + }) - event.recipes.gtceu.food_processor('cookie_dough') - .itemInputs('#tfc:sweetener', 'firmalife:food/butter', '#tfc:foods/flour', '#forge:eggs', 'firmalife:spice/vanilla') - .itemOutputs('4x firmalife:food/cookie_dough') - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", "yeast_starter", { + duration: 1200, + EUt: 8, + circuit: 1, + fluidInputs: [Fluid.of('firmalife:yeast_starter', 100)], + fluidOutputs: [Fluid.of('firmalife:yeast_starter', 600)], + itemInputHints: ['#tfc:foods/flour'], + itemInputs: [NotRotten('#tfc:foods/flour')] + }) - registerTFCRecipeProperties('chocolate_chip_cookie_dough', - [ TFC.ingredient.notRotten('firmalife:food/cookie_dough'), TFC.ingredient.notRotten('#firmalife:chocolate_blends') ], - TFC.isp.of('4x firmalife:food/chocolate_chip_cookie_dough').copyOldestFood()) + registerFoodRecipe("food_processor", "cocoa_dust", { + duration: 100, + EUt: 4, + itemInputHints: ["firmalife:food/roasted_cocoa_beans"], + itemOutputHint: "gtceu:cocoa_dust", + itemInputs: [NotRotten('firmalife:food/roasted_cocoa_beans')], + itemOutputProvider: TFC.isp.of("gtceu:cocoa_dust") + }) - event.recipes.gtceu.food_processor('chocolate_chip_cookie_dough') - .itemInputs('4x firmalife:food/cookie_dough', '#firmalife:chocolate_blends') - .itemOutputs('4x firmalife:food/chocolate_chip_cookie_dough') - .duration(300) - .EUt(16) + registerFoodRecipe("food_processor", "soybean_paste", { + duration: 50, + EUt: 8, + itemInputHints: ["firmalife:food/dehydrated_soybeans"], + itemOutputHint: "firmalife:food/soybean_paste", + itemInputs: [NotRotten('firmalife:food/dehydrated_soybeans')], + itemOutputProvider: TFC.isp.of("firmalife:food/soybean_paste") + }) - // Hardtack Dough - registerTFCRecipeProperties('hardtack_dough', - [ TFC.ingredient.notRotten('#tfc:foods/flour') ], - TFC.isp.of('4x firmalife:food/hardtack_dough').copyOldestFood()) + registerFoodRecipe("food_processor", "red_grapes", { + duration: 50, + EUt: 8, + itemInputHints: ["firmalife:food/red_grapes"], + itemOutputHint: "firmalife:food/smashed_red_grapes", + itemInputs: [NotRotten('firmalife:food/red_grapes')], + itemOutputProvider: TFC.isp.of('firmalife:food/smashed_red_grapes').copyOldestFood() + }) - event.recipes.gtceu.food_processor('hardtack_dough') - .itemInputs('tfc:powder/salt', '#tfc:foods/flour') - .inputFluids(Fluid.of('minecraft:water', 1000)) - .itemOutputs('4x firmalife:food/hardtack_dough') - .duration(300) - .EUt(16) - .circuit(4) + registerFoodRecipe("food_processor", "white_grapes", { + duration: 50, + EUt: 8, + itemInputHints: ["firmalife:food/white_grapes"], + itemOutputHint: "firmalife:food/smashed_white_grapes", + itemInputs: [NotRotten('firmalife:food/white_grapes')], + itemOutputProvider: TFC.isp.of('firmalife:food/smashed_white_grapes').copyOldestFood() + }) - // Yeast starter - registerTFCRecipeProperties('yeast_starter', - [ TFC.ingredient.notRotten('#tfc:foods/flour') ]) + registerFoodRecipe("food_processor", "egg_noodles", { + duration: 50, + EUt: 8, + itemInputHints: ["firmalife:foods/egg_noodle_flour", 'tfc:powder/salt', '#forge:eggs'], + itemOutputHint: 'firmalife:food/raw_egg_noodles', + itemInputs: [NotRotten("firmalife:foods/egg_noodle_flour"), NotRotten('#forge:eggs'), 'tfc:powder/salt'], + fluidInputs: [Fluid.of('#tfc:milks', 1000)], + itemOutputProvider: TFC.isp.of("firmalife:food/raw_egg_noodles").copyOldestFood(), + }) - event.recipes.gtceu.food_processor('yeast_starter') - .inputFluids(Fluid.of('firmalife:yeast_starter', 100)) - .itemInputs('#tfc:foods/flour') - .outputFluids(Fluid.of('firmalife:yeast_starter', 600)) - .duration(1200) - .EUt(8) - .circuit(1) + registerFoodRecipe("food_processor", "rice_noodles", { + duration: 50, + EUt: 8, + itemInputHints: ["tfc:food/rice_flour", 'tfc:food/maize_flour', 'tfc:powder/salt'], + fluidInputs: [Fluid.of('#tfc:milks', 1000)], + itemOutputHint: '2x firmalife:food/raw_rice_noodles', + itemInputs: [NotRotten("tfc:food/rice_flour"), NotRotten('tfc:food/maize_flour'), 'tfc:powder/salt'], + itemOutputProvider: TFC.isp.of('2x firmalife:food/raw_rice_noodles').copyOldestFood() + }) - // Cocoa Dust - registerTFCRecipeProperties('cocoa_dust', - [ TFC.ingredient.notRotten('firmalife:food/roasted_cocoa_beans') ]) + registerFoodRecipe("food_processor", "cured_maize", { + duration: 300, + EUt: 8, + itemInputHints: ["tfc:food/maize_grain"], + itemOutputHint: "firmalife:food/cured_maize", + itemInputs: [NotRotten("tfc:food/maize_grain")], + itemOutputProvider: TFC.isp.of('firmalife:food/cured_maize').copyOldestFood() + }) - event.recipes.gtceu.food_processor('cocoa_dust') - .itemInputs('firmalife:food/roasted_cocoa_beans') - .itemOutputs('gtceu:cocoa_dust') - .duration(100) - .EUt(2) + registerFoodRecipe("food_processor", "soy_mixture", { + duration: 300, + EUt: 8, + itemInputHints: ["tfc:food/soybean", 'tfc:powder/salt'], + itemOutputHint: "firmalife:food/soy_mixture", + fluidInputs: [Fluid.of('minecraft:water', 50)], + itemInputs: [NotRotten("tfc:food/soybean"), "tfc:powder/salt"], + itemOutputProvider: TFC.isp.of('firmalife:food/soy_mixture').copyOldestFood(), - // Soybean paste - registerTFCRecipeProperties('soybean_paste', - [ TFC.ingredient.notRotten('firmalife:food/dehydrated_soybeans') ]) + }) - event.recipes.gtceu.food_processor('soybean_paste') - .itemInputs('firmalife:food/dehydrated_soybeans') - .itemOutputs('firmalife:food/soybean_paste') - .duration(50) - .EUt(7) + registerFoodRecipe("food_oven", "boiled_egg", { + duration: 200, + EUt: 8, + itemInputHints: ["#firmalife:foods/raw_eggs"], + itemOutputHint: "firmalife:food/boiled_egg", + fluidInputs: [Fluid.of('minecraft:water', 200)], + itemInputs: [NotRotten('#firmalife:foods/raw_eggs')], + itemOutputProvider: TFC.isp.of('firmalife:food/boiled_egg').copyOldestFood() + }) - // Smashed red grapes - registerTFCRecipeProperties('red_grapes', - [ TFC.ingredient.notRotten('firmalife:food/red_grapes') ], - TFC.isp.of('firmalife:food/smashed_red_grapes').copyOldestFood()) - - event.recipes.gtceu.food_processor('red_grapes') - .itemInputs('firmalife:food/red_grapes') - .itemOutputs('firmalife:food/smashed_red_grapes') - .duration(50) - .EUt(7) - - // Smashed white grapes - registerTFCRecipeProperties('white_grapes', - [ TFC.ingredient.notRotten('firmalife:food/white_grapes') ], - TFC.isp.of('firmalife:food/smashed_white_grapes').copyOldestFood()) - - event.recipes.gtceu.food_processor('white_grapes') - .itemInputs('firmalife:food/white_grapes') - .itemOutputs('firmalife:food/smashed_white_grapes') - .duration(50) - .EUt(7) - - // Egg Noodles - registerTFCRecipeProperties('egg_noodles', - [ TFC.ingredient.notRotten("firmalife:foods/egg_noodle_flour"), TFC.ingredient.notRotten('#forge:eggs') ], - TFC.isp.of('firmalife:food/smashed_white_grapes').copyOldestFood()) - - event.recipes.gtceu.food_processor('egg_noodles') - .itemInputs("firmalife:foods/egg_noodle_flour", 'tfc:powder/salt', '#forge:eggs') - .inputFluids(Fluid.of('#tfc:milks', 1000)) - .itemOutputs('firmalife:food/raw_egg_noodles') - .duration(50) - .EUt(7) - - // Rice Noodles - registerTFCRecipeProperties('rice_noodles', - [ TFC.ingredient.notRotten("tfc:food/rice_flour"), TFC.ingredient.notRotten('tfc:food/maize_flour') ], - TFC.isp.of('firmalife:food/raw_rice_noodles').copyOldestFood()) - - event.recipes.gtceu.food_processor('rice_noodles') - .itemInputs("tfc:food/rice_flour", 'tfc:food/maize_flour', 'tfc:powder/salt') - .inputFluids(Fluid.of('#tfc:milks', 1000)) - .itemOutputs('2x firmalife:food/raw_egg_noodles') - .duration(50) - .EUt(7) - - // Cured Maize - registerTFCRecipeProperties('cured_maize', - [ TFC.ingredient.notRotten("tfc:food/maize_grain") ], - TFC.isp.of('firmalife:food/cured_maize').copyOldestFood()) - - event.recipes.gtceu.food_processor('cured_maize') - .itemInputs("tfc:food/maize_grain") - .inputFluids(Fluid.of('tfc:limewater', 100)) - .itemOutputs('firmalife:food/cured_maize') - .duration(300) - .EUt(7) - - // Soy Mixture - registerTFCRecipeProperties('soy_mixture', - [ TFC.ingredient.notRotten("tfc:food/soybean") ], - TFC.isp.of('firmalife:food/soy_mixture').copyOldestFood()) - - event.recipes.gtceu.food_processor('soy_mixture') - .itemInputs("tfc:food/soybean", 'tfc:powder/salt') - .inputFluids(Fluid.of('minecraft:water', 50)) - .itemOutputs('firmalife:food/soy_mixture') - .duration(300) - .EUt(7) - - // Boiled Egg - registerTFCRecipeProperties('boiled_egg', - [ TFC.ingredient.notRotten('#firmalife:foods/raw_eggs') ], - TFC.isp.of('firmalife:food/soy_mixture').copyOldestFood()) - - event.recipes.gtceu.food_processor('boiled_egg') - .itemInputs('#firmalife:foods/raw_eggs') - .inputFluids(Fluid.of('minecraft:water', 200)) - .itemOutputs('firmalife:food/boiled_egg') - .duration(200) - .EUt(7) - - // Cooked rice - registerTFCRecipeProperties('cooked_rice', - [ TFC.ingredient.notRotten('tfc:food/rice_grain') ], - TFC.isp.of('firmalife:food/soy_mixture').copyOldestFood()) - - event.recipes.gtceu.food_processor('cooked_rice') - .itemInputs('tfc:food/rice_grain') - .inputFluids(Fluid.of('minecraft:water', 200)) - .itemOutputs('firmalife:food/cooked_rice') - .duration(200) - .EUt(7) + registerFoodRecipe("food_oven", "cooked_rice", { + duration: 200, + EUt: 8, + itemInputHints: ["tfc:food/rice_grain"], + itemOutputHint: "firmalife:food/cooked_rice", + fluidInputs: [Fluid.of('minecraft:water', 200)], + itemInputs: [NotRotten('tfc:food/rice_grain')], + itemOutputProvider: TFC.isp.of('firmalife:food/cooked_rice').copyOldestFood() + }) // These don't need the ISP handling, they're just here to keep all the food recipes together diff --git a/kubejs/server_scripts/tfg/recipes.js b/kubejs/server_scripts/tfg/recipes.js index eec0f9d35..0f4bc7713 100644 --- a/kubejs/server_scripts/tfg/recipes.js +++ b/kubejs/server_scripts/tfg/recipes.js @@ -14,4 +14,5 @@ const registerTFGRecipes = (event) => { registerTFGSupportRecipes(event) registerTFGFishingNetsRecipes(event) registerTFGConvertingRecipes(event) + registerTFGFoodRecipes(event) } \ No newline at end of file diff --git a/kubejs/startup_scripts/gtceu/machines.js b/kubejs/startup_scripts/gtceu/machines.js index 936294408..21cb9ddfd 100644 --- a/kubejs/startup_scripts/gtceu/machines.js +++ b/kubejs/startup_scripts/gtceu/machines.js @@ -1,7 +1,5 @@ // priority: 0 -//#region Greenhouse - const registerGTCEuMachines = (event) => { GTMachineUtils.registerCrate(GTMaterials.BismuthBronze, 54, "Bismuth Bronze Crate"); @@ -12,66 +10,6 @@ const registerGTCEuMachines = (event) => { const $SteamMulti = Java.loadClass('com.gregtechceu.gtceu.common.machine.multiblock.steam.SteamParallelMultiblockMachine'); const $Tags = Java.loadClass("dev.latvian.mods.kubejs.util.Tags") - event.create('greenhouse', 'multiblock') - .rotationState(RotationState.NON_Y_AXIS) - .recipeType('greenhouse') - .recipeModifiers([GTRecipeModifiers.OC_PERFECT]) - .appearanceBlock(GTBlocks.CASING_STEEL_SOLID) - .pattern(definition => FactoryBlockPattern.start() - .aisle("CCCCCCC", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", " F ") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ") - .aisle("CDDDDDC", "F#####F", "F#####F", "F#####F", "F#####F", "F#####F", "F#####F", "F#####F", "FFFFFFF") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ") - .aisle("CCCYCCC", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", " F ") - .where('X', Predicates.blocks('ae2:quartz_glass')) - .where('F', Predicates.frames('steel')) - .where('D', Predicates.blocks('tfc:grass/silt') - .or(Predicates.blocks('tfc:dirt/loam')) - .or(Predicates.blocks('tfc:dirt/sandy_loam')) - .or(Predicates.blocks('tfc:dirt/silty_loam')) - .or(Predicates.blocks('tfc:grass/silt')) - .or(Predicates.blocks('tfc:grass/loam')) - .or(Predicates.blocks('tfc:grass/sandy_loam')) - .or(Predicates.blocks('tfc:grass/silty_loam'))) - .where('C', Predicates.blocks('gtceu:steel_machine_casing').or(Predicates.autoAbilities(definition.getRecipeTypes()))) - .where('#', Predicates.air() - .or(Predicates.blockTag($Tags.block("minecraft:logs"))) - .or(Predicates.blockTag($Tags.block("minecraft:leaves")))) - .where(' ', Predicates.any()) - .where('Y', Predicates.controller(Predicates.blocks(definition.get()))) - .build() - ) - .shapeInfo(controller => MultiblockShapeInfo.builder() - .aisle("CCCCCCC", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", " F ") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X##L##X", "X#LLL#X", "X##L##X", "X#####X", " XXFXX ") - .aisle("CDDDDDC", "F##W##F", "F##W##F", "F##W##F", "F#LWL#F", "F#LWL#F", "F#LLL#F", "F#####F", "FFFFFFF") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X##L##X", "X#LLL#X", "X##L##X", "X#####X", " XXFXX ") - .aisle("CDDDDDC", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", "X#####X", " XXFXX ") - .aisle("CitYfeC", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", "XXXFXXX", " F ") - .where('Y', controller, Direction.SOUTH) - .where('C', GTBlocks.STEEL_HULL.get()) - .where('D', Block.getBlock('tfc:grass/silt')) - .where('F', Block.getBlock('gtceu:steel_frame')) - .where('X', Block.getBlock('ae2:quartz_glass')) - .where('W', Block.getBlock('tfc:wood/log/oak')) - .where('L', Block.getBlock('tfc:wood/leaves/oak')) - .where(' ', Block.getBlock('minecraft:air')) - .where('i', GTMachines.ITEM_IMPORT_BUS[GTValues.ULV], Direction.SOUTH) - .where('t', GTMachines.ITEM_EXPORT_BUS[GTValues.ULV], Direction.SOUTH) - .where('f', GTMachines.FLUID_IMPORT_HATCH[GTValues.ULV], Direction.SOUTH) - .where('e', GTMachines.ENERGY_INPUT_HATCH[GTValues.LV], Direction.SOUTH) - .build() - ) - .workableCasingRenderer( - 'gtceu:block/casings/solid/machine_casing_solid_steel', - 'gtceu:block/multiblock/implosion_compressor', false - ) - - //#endregion - //#region Nether Dome event.create('nether_dome', 'multiblock') diff --git a/kubejs/startup_scripts/gtceu/recipe_types.js b/kubejs/startup_scripts/gtceu/recipe_types.js index 7ba54d0be..979ef3a46 100644 --- a/kubejs/startup_scripts/gtceu/recipe_types.js +++ b/kubejs/startup_scripts/gtceu/recipe_types.js @@ -1,13 +1,6 @@ // priority: 0 const registerGTCEuRecipeTypes = (event) => { - event.create('greenhouse') - .category('greenhouse') - .setEUIO('in') - .setMaxIOSize(3, 4, 1, 0) - .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, FillDirection.LEFT_TO_RIGHT) - .setSound(GTSoundEntries.BATH) - event.create('nether_dome') .category('nether_dome') .setEUIO('in') diff --git a/kubejs/startup_scripts/tfc/constants.js b/kubejs/startup_scripts/tfc/constants.js index 1ffefc5bf..c4399dc21 100644 --- a/kubejs/startup_scripts/tfc/constants.js +++ b/kubejs/startup_scripts/tfc/constants.js @@ -852,7 +852,7 @@ global.TFC_BATCH_TO_BOTTLE_ASSEMBLING_RECIPE_COMPONENTS = [ { input: 'tfc:volcanic_glass_batch', output: 'tfc:volcanic_glass_bottle', name: 'volcanic_glass_bottle' }, ]; -global.TFC_FURNACE_MEAT_RECIPE_COMPONENTS = [ +global.TFC_MEAT_RECIPE_COMPONENTS = [ { input: 'tfc:food/horse_meat', output: 'tfc:food/cooked_horse_meat', name: 'cooked_horse_meat' }, { input: 'tfc:food/bear', output: 'tfc:food/cooked_bear', name: 'cooked_bear' }, { input: 'tfc:food/mutton', output: 'tfc:food/cooked_mutton', name: 'cooked_mutton' },