From 7737fff562d5078019393591e62795477128e65a Mon Sep 17 00:00:00 2001 From: Rodg88 Date: Wed, 19 Jan 2022 18:51:55 +1100 Subject: [PATCH] Add pre-genned NBT to thermal cells Adding the NBT from a newly crafted thermal cell to the default output for thermal cells stops RS autocrafting getting really confused. --- .../recipetypes/thermal/replace_output.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 kubejs/server_scripts/enigmatica/kubejs/expert/recipetypes/thermal/replace_output.js diff --git a/kubejs/server_scripts/enigmatica/kubejs/expert/recipetypes/thermal/replace_output.js b/kubejs/server_scripts/enigmatica/kubejs/expert/recipetypes/thermal/replace_output.js new file mode 100644 index 0000000000..2c1c450257 --- /dev/null +++ b/kubejs/server_scripts/enigmatica/kubejs/expert/recipetypes/thermal/replace_output.js @@ -0,0 +1,23 @@ +onEvent('recipes', (event) => { + if (global.isExpertMode == false) { + return; + } + + const recipes = [ + { + replaceTarget: { id: 'thermal:fluid_cell' }, + toReplace: 'thermal:fluid_cell', + replaceWith: Item.of('thermal:fluid_cell', '{BlockEntityTag:{TankInv:[{FluidName:"minecraft:empty",Capacity:32000,Tank:0b,Amount:0}]}}') + }, + { + replaceTarget: { id: 'thermal:energy_cell' }, + toReplace: 'thermal:energy_cell', + replaceWith: Item.of('thermal:energy_cell', '{BlockEntityTag:{EnergyMax:1000000,EnergySend:1000,Energy:0,EnergyRecv:1000}}') + } + ]; + + recipes.forEach((recipe) => { + event.replaceOutput(recipe.replaceTarget, recipe.toReplace, recipe.replaceWith); + }); + +});