From ba9da1da103cec14fb9acef18b1497e04674ac7c Mon Sep 17 00:00:00 2001 From: copygirl Date: Tue, 19 Jul 2022 18:42:00 +0200 Subject: [PATCH] Stonecutter supports Malum woods --- .../recipes/essentials/stairs.js | 2 +- .../recipes/stonecutter_cuts_wood.js | 45 +++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/kubejs/server_scripts/recipes/essentials/stairs.js b/kubejs/server_scripts/recipes/essentials/stairs.js index 7ea4e78..c25db8b 100644 --- a/kubejs/server_scripts/recipes/essentials/stairs.js +++ b/kubejs/server_scripts/recipes/essentials/stairs.js @@ -2,7 +2,7 @@ onEvent("recipes", event => { // For each stair crafting recipe that outputs 4x stairs, ... - event.forEachRecipe({ id: /_stairs/, type: "minecraft:crafting_shaped" }, recipe => { + event.forEachRecipe({ id: /stairs/, type: "minecraft:crafting_shaped" }, recipe => { if (recipe.outputItems[0].getCount() != 4) return; let input = recipe.inputItems[0]; diff --git a/kubejs/server_scripts/recipes/stonecutter_cuts_wood.js b/kubejs/server_scripts/recipes/stonecutter_cuts_wood.js index 7a396ee..2a8a31e 100644 --- a/kubejs/server_scripts/recipes/stonecutter_cuts_wood.js +++ b/kubejs/server_scripts/recipes/stonecutter_cuts_wood.js @@ -140,6 +140,12 @@ onEvent("recipes", event => { ], } ], + compatoplenty: [ + { + woods: WOOD_TYPES.biomesoplenty, + types: [ "vertical_planks", "vertical_slab", "post", "stripped_post", "ladder" ], + }, + ], twilightforest: [ { woods: WOOD_TYPES.twilightforest, @@ -163,10 +169,23 @@ onEvent("recipes", event => { format: { DEFAULT: "{MOD}:darkwood_{TYPE}" }, }, ], - compatoplenty: [ + malum: [ { - woods: WOOD_TYPES.biomesoplenty, - types: [ "vertical_planks", "vertical_slab", "post", "stripped_post", "ladder" ], + woods: [ "runewood", "soulwood" ], + types: [ + "any_log", "log", "wood", "stripped_log", "stripped_wood", + "planks", "door", "trapdoor", "fence", "fence_gate", + "sign", "boat", "vertical_planks", "beam", + ], + format: { + wood: "{MOD}:{WOOD}", + stripped_wood: "{MOD}:stripped_{WOOD}", + }, + }, + { + woods: [ "runewood", "soulwood" ], + types: [ "stairs", "slab", "fence", "fence_gate", "button", "pressure_plate" ], + format: { DEFAULT: "{MOD}:{WOOD}_planks_{TYPE}" }, }, ], }; @@ -201,4 +220,24 @@ onEvent("recipes", event => { } } } + + // Additional Malum wood blocks + for (let wood of [ "runewood", "soulwood" ]) { + event.stonecutting(`4x malum:${wood}_panel`, `#malum:${wood}_logs`); + event.stonecutting(`4x malum:${wood}_tiles`, `#malum:${wood}_logs`); + + event.stonecutting(`malum:${wood}_panel`, `malum:${wood}_planks`); + event.stonecutting(`malum:${wood}_tiles`, `malum:${wood}_planks`); + event.stonecutting(`malum:${wood}_tiles`, `malum:${wood}_panel`); + + event.stonecutting(`2x malum:vertical_${wood}_planks_slab`, `malum:vertical_${wood}_planks`); + event.stonecutting(`2x malum:${wood}_panel_slab`, `malum:${wood}_panel`); + event.stonecutting(`2x malum:${wood}_tiles_slab`, `malum:${wood}_tiles`); + + event.stonecutting(`malum:vertical_${wood}_planks_stairs`, `malum:vertical_${wood}_planks`); + event.stonecutting(`malum:${wood}_panel_stairs`, `malum:${wood}_panel`); + event.stonecutting(`malum:${wood}_tiles_stairs`, `malum:${wood}_tiles`); + + event.stonecutting(`malum:solid_${wood}_trapdoor`, `malum:${wood}_planks`); + } });