diff --git a/packwiz/1.20.1/kubejs/server_scripts/boats_gregified_recipes.js b/packwiz/1.20.1/kubejs/server_scripts/boats_gregified_recipes.js new file mode 100644 index 0000000..e01a960 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/boats_gregified_recipes.js @@ -0,0 +1,74 @@ +// Modifies the recipes for boats to match the Biome O' Plenty Gregified Integrations recipes + +const BOATS_RECIPES = [ + "minecraft:oak_boat", + "minecraft:spruce_boat", + "minecraft:birch_boat", + "minecraft:jungle_boat", + "minecraft:acacia_boat", + "minecraft:dark_oak_boat", + "minecraft:mangrove_boat", + "minecraft:cherry_boat", + "quark:ancient_boat", + "quark:azalea_boat", + "quark:blossom_boat", + "aether:skyroot_boat", + "thermal:rubberwood_boat", + "meadow:pine_boat", + "regions_unexplored:baobab_boat", + "regions_unexplored:blackwood_boat", + "regions_unexplored:cypress_boat", + "regions_unexplored:dead_boat", + "regions_unexplored:eucalyptus_boat", + "regions_unexplored:joshua_boat", + "regions_unexplored:kapok_boat", + "regions_unexplored:larch_boat", + "regions_unexplored:magnolia_boat", + "regions_unexplored:maple_boat", + "regions_unexplored:mauve_boat", + "regions_unexplored:palm_boat", + "regions_unexplored:pine_boat", + "regions_unexplored:redwood_boat", + "regions_unexplored:socotra_boat", + "regions_unexplored:willow_boat", +]; + +const BOATS_MOD_RECIPE_IDS_PATTERN = { + minecraft: ":", + quark: "quark:world/crafting/woodsets//boat", + aether: ":", + thermal: ":", + meadow: ":", + regions_unexplored: ":", +}; + +ServerEvents.recipes((event) => { + BOATS_RECIPES.forEach((recipe) => { + const [identifier, name] = recipe.split(":"); + const type = name.split("_").slice(0, -1).join("_"); + + event.remove({ + id: BOATS_MOD_RECIPE_IDS_PATTERN[identifier] + .replace("", identifier) + .replace("", name) + .replace("", type), + }); + + if (identifier === "minecraft" || identifier === "quark") { + event.remove({ + id: `quark:tweaks/crafting/utility/chest_boat/direct_${type}_chest_boat`, + }); + } + + event.shaped(Item.of(recipe, 1), ["WHW", "WKW", "SSS"], { + W: `${identifier}:${type}_planks`, + H: "minecraft:wooden_shovel", + K: "#forge:tools/knives", + S: `${identifier}:${ + identifier === "quark" ? `${type}_planks` : type + }_slab`, + }); + }); + + event.remove({ id: "regions_unexplored:oak_boat" }); +});