From 24b3fa0898df4a12e6c76951be782f9b5300bb1a Mon Sep 17 00:00:00 2001 From: ltdk Date: Thu, 11 Dec 2025 16:06:12 -0500 Subject: [PATCH] Make compacting recipes script match TTS version, add ender pearl fragment compacting --- .../Functional Storage/compacting_recipe.js | 11 ---------- .../mods/Functional Storage/recipes.js | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 11 deletions(-) delete mode 100644 kubejs/server_scripts/mods/Functional Storage/compacting_recipe.js create mode 100644 kubejs/server_scripts/mods/Functional Storage/recipes.js diff --git a/kubejs/server_scripts/mods/Functional Storage/compacting_recipe.js b/kubejs/server_scripts/mods/Functional Storage/compacting_recipe.js deleted file mode 100644 index 5e00824e2..000000000 --- a/kubejs/server_scripts/mods/Functional Storage/compacting_recipe.js +++ /dev/null @@ -1,11 +0,0 @@ -ServerEvents.recipes(allthemods => { - function compacting(/** @type {$ItemStackKJS_} */LowerItem,/** @type {$ItemStackKJS_} */HigherItem) { - allthemods.custom({ - type: "functionalstorage:custom_compacting", - higher_input: HigherItem, - lower_input: LowerItem - }) - } - compacting(Item.of("8x utilitarian:tiny_charcoal"), Item.of("minecraft:charcoal")) - compacting(Item.of("8x utilitarian:tiny_coal"), Item.of("minecraft:coal")) -}) diff --git a/kubejs/server_scripts/mods/Functional Storage/recipes.js b/kubejs/server_scripts/mods/Functional Storage/recipes.js new file mode 100644 index 000000000..87aaea11f --- /dev/null +++ b/kubejs/server_scripts/mods/Functional Storage/recipes.js @@ -0,0 +1,22 @@ +ServerEvents.recipes(allthemods => { + /** + * @param {$ItemStack} lower + * @param {$ItemStack} higher + */ + function compact(lower, higher) { + let recipe = { + type: "functionalstorage:custom_compacting", + higher_input: higher.toJson(), + lower_input: lower.toJson() + } + + allthemods + .custom(recipe) + .id(`allthemods:functionalstorage/compacting/${lower.id.split(":")[1]}_to_${higher.id.split(":")[1]}`) + } + + compact(Item.of("utilitarian:tiny_charcoal", 8), Item.of("minecraft:charcoal")) + compact(Item.of("utilitarian:tiny_coal", 8), Item.of("minecraft:coal")) + + compact(Item.of("forbidden_arcanus:ender_pearl_fragment", 4), Item.of("minecraft:ender_pearl")) +})