From e3fc2cf3e23c4f682399c98d72984468cf5a85b5 Mon Sep 17 00:00:00 2001 From: copygirl Date: Wed, 3 Aug 2022 19:24:30 +0200 Subject: [PATCH] Unify plate crafting --- kubejs/server_scripts/unification/plates.js | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 kubejs/server_scripts/unification/plates.js diff --git a/kubejs/server_scripts/unification/plates.js b/kubejs/server_scripts/unification/plates.js new file mode 100644 index 0000000..1651070 --- /dev/null +++ b/kubejs/server_scripts/unification/plates.js @@ -0,0 +1,45 @@ +// priority: 0 + +onEvent("recipes", event => { + const toHammer = [ + // Vanilla + "netherite", + // Create + "brass", + // Thermal Integration + "rose_gold", + // Thermal Foundation + "tin", "bronze", "invar", + "signalum", "lumium", "enderium", + ]; + const toMetalPress = [ "netherite", "signalum", "lumium", "enderium", ]; + const toMultiservoPress = [ "brass", "gold" ]; + const toMechanicalPress = [ + // Vanilla + "netherite", + // Immersive Engineering + "aluminum", "uranium", "steel", + // Thermal Integration + "rose_gold", + // Thermal Foundation + "tin", "lead", "silver", "nickel", + "bronze", "electrum", "invar", "constantan", + "signalum", "lumium", "enderium", + ]; + + function get(material, shape) { return global.unification[material][shape][0]; } + + for (let material of toHammer) + event.shapeless(get(material, "plate"), + [ get(material, "ingot"), "immersiveengineering:hammer" ]); + + for (let material of toMetalPress) + event.recipes.immersiveengineeringMetalPress(get(material, "plate"), + get(material, "ingot"), "immersiveengineering:mold_plate"); + + for (let material of toMultiservoPress) + event.recipes.thermal.press(get(material, "plate"), get(material, "ingot")); + + for (let material of toMechanicalPress) + event.recipes.createPressing(get(material, "plate"), get(material, "ingot")); +});