From f8222895731efecc6fa201a10a876593ad6653e5 Mon Sep 17 00:00:00 2001 From: ofoxsmith <77560533+ofoxsmith@users.noreply.github.com> Date: Thu, 12 Jun 2025 22:32:10 +1000 Subject: [PATCH] custom gregtech machines and logic to handle TFC recipes (#1160) * Change lv chem reactor quest to require any container with rubber instead of a rubber bucket Signed-off-by: ofoxsmith <77560533+ofoxsmith@users.noreply.github.com> * Add placeholder assets for food machines (copied from gtceu) * remove greenhouse definition from kubejs * change greenhouse recipe * Rework recipes file --------- Signed-off-by: ofoxsmith <77560533+ofoxsmith@users.noreply.github.com> Signed-off-by: Pyritie Co-authored-by: Pyritie --- .../machines/food_oven/overlay_front.png | Bin 0 -> 248 bytes .../food_oven/overlay_front_active.png | Bin 0 -> 292 bytes .../overlay_front_active_emissive.png | Bin 0 -> 241 bytes .../food_oven/overlay_front_emissive.png | Bin 0 -> 149 bytes .../machines/food_processor/overlay_back.png | Bin 0 -> 75 bytes .../food_processor/overlay_back_active.png | Bin 0 -> 75 bytes .../overlay_back_active.png.mcmeta | 5 + .../machines/food_processor/overlay_front.png | Bin 0 -> 341 bytes .../food_processor/overlay_front_active.png | Bin 0 -> 683 bytes .../overlay_front_active.png.mcmeta | 5 + .../machines/food_processor/overlay_side.png | Bin 0 -> 334 bytes .../food_processor/overlay_side_active.png | Bin 0 -> 683 bytes .../overlay_side_active.png.mcmeta | 5 + .../machines/food_processor/overlay_top.png | Bin 0 -> 348 bytes .../food_processor/overlay_top_active.png | Bin 0 -> 542 bytes .../overlay_top_active.png.mcmeta | 5 + .../gregtech/recipes.machines.js | 2 +- kubejs/server_scripts/tfg/recipes.food.js | 926 +++++++++--------- kubejs/server_scripts/tfg/recipes.js | 1 + kubejs/startup_scripts/gtceu/machines.js | 62 -- kubejs/startup_scripts/gtceu/recipe_types.js | 7 - kubejs/startup_scripts/tfc/constants.js | 2 +- 22 files changed, 489 insertions(+), 531 deletions(-) create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_active_emissive.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_oven/overlay_front_emissive.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_back_active.png.mcmeta create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_front_active.png.mcmeta create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_side_active.png.mcmeta create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png create mode 100644 kubejs/assets/gtceu/textures/block/machines/food_processor/overlay_top_active.png.mcmeta 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 0000000000000000000000000000000000000000..de1abfe728887db34f3c30f4eb6cbdf84aea2db9 GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s77>k44ofy`glX=O&z`&C3 z=pRfOCesk7g%kUsC6VENz9_$s*Ka#Lk*U)X& zGl^t{mJ9bd8+R=X;P%pdl~;7`3S&rnHsc+m=DS~+ehY>fxU8A+jpyH7yCajc7I!^h y^^5*e@hwFlp-MczZ-Qe&X=T|r%jUZbF*6sLEe;D@a*lz4fx*+&&t;ucLK6UxJzFOL literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5b9e6ea6739d56cd2a782cfb033e498966bbd628 GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s77>k44ofy`glX=O&z`&C3 z=;T#aA3K( z;KDJsgpJKI9XF_O}sGm5$oj>ITK{84j3@7g|t{oNIYraQDEC#$iTz= rK+4g9v&)g8-BG0dpaU}-8^f~WmispZs5mk(Ffe$!`njxgN@xNAnMh;s literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4da15531758294c4b06ac119be05b106f4ae87fe GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s77>k44ofy`glX=O&z`&C3 z=xx>8|qk*Bo~qW;Jlm zv{>QOy~ZM^?&$~p!zbn|>^eAQA>%Q&i|*&*ESW;N*n9${m{)KVuP{ErDCxkH_LxC} q?SN@hgOErw17mZWPC^0$!=78})Aruf6=7gtVDNPHb6Mw<&;$SiH%_ns literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..c20a1c9810d77b74d42b9829129c1c640700e925 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4rT@h1`S>QU?3X literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..f02154247c2653f7aa4f2c50135ee47eb28d1f9f GIT binary patch literal 75 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7ggjjwLo9le6C_v{Cy4Yg caWF8j2rw|#`&RTZFfcH9y85}Sb4q9e0PjW)-2eap literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..f02154247c2653f7aa4f2c50135ee47eb28d1f9f GIT binary patch literal 75 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7ggjjwLo9le6C_v{Cy4Yg caWF8j2rw|#`&RTZFfcH9y85}Sb4q9e0PjW)-2eap literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5bd5b3654a3e463b7c814f8d5171d792abba52eb GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s77>k44ofy`glX=O&z`&C3 z=KH*Wmc zzhsHZly&BHt=$A zbUQ|JIBa2Dw@fWSOzVIFgUEG-=goTb7ZGd;UT251wsic1;Uyx=U%*~s$Qb>9)U3xBT1 z7FU~#@0FP$@Q(fTyO=Wd&8N@)FUxpz=H$Qj6r-P+5^Y;bR$bM4`nfWvT`6TlG&hn=2!msBl_iIg}buUIIDtELT z-XhoEUAX@C(y19!q`vOj@OA@V(akk7FAr>#y>>88>*^tnZG)Aa8G*GA2 zY0E^93zIXsZudQ7$d@{>U%Bf@f?`zmhI$)r{&P-e1Ao*_WoEKvSi`L2=JkG`U3c3? zX+Cx@{x~kyiR>8?k7p)YZJyH0kf2z?z?-Z$wQ)7G^@$7iuNln+HP1dQSn!1*h)vSD zc?L_B!Py^nE@x*5+B#U(--+{lU4Dau;T_AXx`y3N>b4F{j_eZx8h%G<$0%=DwC`H| zHRir%AGf{|8NLPVue_KwnUnAGPZ49O`oIr0g<1_lOCS3j3^P6k44ofy`glX=O&z`&C3 z=KH*Wmc zzhsHZly zRc*Vw{CvYt1qDSN7BS~?S>Y*ej0&yO-``FC@#81AM6*frfye#v2TY6(WHERcZ)8}_ zs8I0vpfX!soSZ@3$8WL`Zw}uMPmq#KFlAU08SBV*rmd1Ojl=4|OQswLhX|fiP7I59 z3rtNLHw7@ZF)rA_W-0%KSAe0FQ73EzqX@HuCNGPFpQ*W7;)Q_A49Njs8jqy>tbCA_ j(C}!9&4q?WMh2&^K>{t(EAKKeFfe$!`njxgN@xNA5FU6o literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..f2b3c4212bf3cb561d04212b7ed709c8d48a53b0 GIT binary patch literal 683 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`XI#V_;wqx%g=T0|NtNage(c!@6@aFBupZ zSkfJR9T^xl_H+M9WMyDr;4JWnEM{Qf764(!waR--85o!xJY5_^BHZ6j-|NNfC~(|; z;|4>Iqyw9c9TzQ#I3nVd)os(X_WXn3A3WR4?3xzz_Nr~%c)?kivytVq>%Jpy7yew2 zEv_~f-zzgi;2rzvcQIw^n@^wpUzYLc%*lW4DMmjtCEB)>th%c8^mAoyZ(72~k1r*2 z*Xf>Cx9Xp2HdjVA%TFvt|A2k+$Ddzi-yTUSnRxbOd`Fma;>R;`clW$8HTbwMVu{~+ zeJQc#qUHKk+H06~wr#$uaj|T#!dgW>_KE*y&)8E@?D_Khtc;88@7J0{>t2jbRPJaw zyhX0RyKw#OrBgGeNPXS4;q3;#qMK`EULM#ed+lJH*3%h#=KGzV*mu}*X^c>HXrNB3 z)0T-I7ba(N-R^tFkS}#$zjD`+1jVTA4fQtM{O6p`2L7m<%FJZTu!dR3&FlR>yY9A) z(tPY*{Bc~Y6WKE)9?wj)+B~I~AwjW(fj3!iYU65V>k}93Uo)BuYMy;qu;2?r5SyfP z^9+_MgR?*ET+YrAv~{qmzZ2*Ay8H$Q!#kE&bq%|l)NLJ@9N8xXH2jXzj#1vQXy3K^ zYs`JkK5l&_GJFfzUwJWWGAG~VpCZOm^?@I13d7{};spyG_AV$oSiE3k44ofy`glX=O&z`&C3 z=KH*Wmc zzhsHZlyrbl_Ax8*dxZZ>u> zn|>~q?V3&HW4RR?S{DK?Cro(yJn@BJU(@auP90_zg>>cYX#!$NKYsk=p23zVu%qxb z+u_Ik@dvUJ8S)s68ZsT&ZX9u7Sj}kgA^CnMt5pHaP(|sT*I~?J0N@lb8-$y zmiL$EO&%G)eF1@Q7*;dt-`m%`Nq}Lt1jhkh234T|o90DaEDll*Gv-fcUneQntFYCe v!Bnwv5tlSW=CPR*5*n^7vANLD$jC79Vq({kNSs54@I14-?iy0WW1wojxJ|%u40|Vn`PZ!4!5AV0r3_T792(+1ja-Ru4O|7V_fT6DI=>TQ2h$m-BfHu@8UB`o?b z$K1QOwDY3kf4>Rs&&{oF-cq<;>N{`ef!XH#{+2&qCEVXH{Up0=-Z8e{nd!MFOD>(h z|EFQw;gj;cY^j?gr978b+$pbh^nXA9&zc0T8w!q-q85rt_^DZTm4Dw-UgFa~m8*R5 zLa`mXQ!QFv*35Hu)-{;maiK!Z`Soh;kQuXst4joCd6i>KHzRwfHQ2%`W9~|N8{{)yiAW=rS-cFnGH9xvX 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' },