From 6b1830e160906228d52262e965f7ccd4f85c6cc0 Mon Sep 17 00:00:00 2001 From: NullBite Date: Tue, 24 Oct 2023 19:32:22 -0400 Subject: [PATCH] Add missing cherry wood recipes --- index.toml | 4 + kubejs/server_scripts/cherry_wood_fixes.js | 96 ++++++++++++++++++++++ pack.toml | 2 +- 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 kubejs/server_scripts/cherry_wood_fixes.js diff --git a/index.toml b/index.toml index 9d078d3..dae3866 100644 --- a/index.toml +++ b/index.toml @@ -60,6 +60,10 @@ hash = "6f5bf766cebabca0bcfa339eeb119956c48c40eba03c5aa39d7685eab67c56b5" file = "config/yosbr/shaderpacks/rethinking-voxels_r0.1_alpha9b.zip.txt" hash = "6e7b02f11cb6feb7f08d1088d042518d1a04cb6b71a7b2b109cf997173510e3c" +[[files]] +file = "kubejs/server_scripts/cherry_wood_fixes.js" +hash = "4f35c8097157e770778f53b4b81dbd3450c1b76d0d99cd8cca76d8551c5dda1e" + [[files]] file = "mods/ad-astra.pw.toml" hash = "ff786550ebc945232c072bd3011919ab9fef52baf819705309d67c961332b604" diff --git a/kubejs/server_scripts/cherry_wood_fixes.js b/kubejs/server_scripts/cherry_wood_fixes.js new file mode 100644 index 0000000..0e365d8 --- /dev/null +++ b/kubejs/server_scripts/cherry_wood_fixes.js @@ -0,0 +1,96 @@ +console.info('fixing cherry wood :3') +// we need plurals becuase "stripped_cherry_log" needs to be in +// "#c:stripped_logs", thanks The English Language i appreciate it very much +const logTypes = [ + {"name": "log", "plural": "logs"}, + {"name": "wood", "plural": "wood"} +] +const farmersDelightSalvageable = [ + "trapdoor", + "sign", + "door" +] + +ServerEvents.tags('item', event => { + for (const type of logTypes) { + event.add('c:stripped_' + type.plural, 'minecraft:stripped_cherry_' + type.name) + } +}) + +ServerEvents.recipes(event => { + for (const type of logTypes) { + // create recipes + event.custom({ + "type": "create:cutting", + "ingredients": [ + { + "item": "minecraft:cherry_" + type.name + } + ], + "results": [ + { + "item": "minecraft:stripped_cherry_" + type.name + } + ], + "processingTime": 50 + }) + event.custom({ + "type": "create:cutting", + "ingredients": [ + { + "item": "minecraft:stripped_cherry_" + type.name + } + ], + "results": [ + { + "item": "minecraft:cherry_planks", + "count": 6 + } + ], + "processingTime": 50 + }) + + // farmer's delight recipes + event.custom({ + "type": "farmersdelight:cutting", + "ingredients": [ + { + "item": "minecraft:cherry_" + type.name + } + ], + "tool": { + "type": "farmersdelight:tool", + "tag": "c:tools/axes" + }, + "result": [ + { + "item": "minecraft:stripped_cherry_" + type.name + }, + { + "item": "farmersdelight:tree_bark" + } + ], + "sound": "minecraft:item.axe.strip" + }) + } + + for (const item of farmersDelightSalvageable) { + event.custom({ + "type": "farmersdelight:cutting", + "ingredients": [ + { + "item": "minecraft:cherry_" + item + } + ], + "tool": { + "type": "farmersdelight:tool", + "tag": "c:tools/axes" + }, + "result": [ + { + "item": "minecraft:cherry_planks" + } + ] + }) + } +}) diff --git a/pack.toml b/pack.toml index c6f5800..f60c8f7 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "865a4f638b2647638c739bc88fa2290764b09e877d9404f4a55a72177eab82a8" +hash = "d622108831dbf250d08d1f52c968ad06407fe38b5d2dce2ef480fa5a1b0e0021" [versions] minecraft = "1.20.1"