From dff9c3cf10e2446325cc3309ebf6bf68a6b5756e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Sat, 22 Jun 2024 21:59:23 +0200 Subject: [PATCH] feat: gregify trapdoor recipes --- .../server_scripts/ad_astra/trapdoor.js | 16 +++++++++++ .../kubejs/server_scripts/aether/trapdoor.js | 9 ++++++ .../server_scripts/gregification_helpers.js | 20 +++++++++++++ .../kubejs/server_scripts/meadow/trapdoor.js | 14 ++++++++++ .../server_scripts/minecraft/trapdoor.js | 26 +++++++++++++++++ .../kubejs/server_scripts/quark/trapdoor.js | 16 +++++++++++ .../regions_unexplored/trapdoor.js | 28 +++++++++++++++++++ .../server_scripts/snowyspirit/trapdoor.js | 10 +++++++ .../supplementaries/trapdoor.js | 10 +++++++ .../kubejs/server_scripts/thermal/trapdoor.js | 9 ++++++ .../kubejs/server_scripts/vinery/trapdoor.js | 9 ++++++ 11 files changed, 167 insertions(+) create mode 100755 packwiz/1.20.1/kubejs/server_scripts/ad_astra/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/aether/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/meadow/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/minecraft/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/quark/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/regions_unexplored/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/snowyspirit/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/supplementaries/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/thermal/trapdoor.js create mode 100755 packwiz/1.20.1/kubejs/server_scripts/vinery/trapdoor.js diff --git a/packwiz/1.20.1/kubejs/server_scripts/ad_astra/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/ad_astra/trapdoor.js new file mode 100755 index 0000000..d8aaf37 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/ad_astra/trapdoor.js @@ -0,0 +1,16 @@ +// Modifies the recipes for trapdoors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + [ + "ad_astra:aeronos_trapdoor", + "ad_astra:strophar_trapdoor", + "ad_astra:glacian_trapdoor", + ].forEach((d) => gregifyTrapdoorRecipe(event, ":", d)); + + gregifyTrapdoorRecipe( + event, + ":", + "ad_astra:steel_trapdoor", + ["gtceu:steel_plate", "#forge:rods/steel"] + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/aether/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/aether/trapdoor.js new file mode 100755 index 0000000..bdc0089 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/aether/trapdoor.js @@ -0,0 +1,9 @@ +// Modifies the recipes for trapdoors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyTrapdoorRecipe( + event, + ":", + "aether:skyroot_trapdoor" + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/gregification_helpers.js b/packwiz/1.20.1/kubejs/server_scripts/gregification_helpers.js index 4182de2..a505e7c 100755 --- a/packwiz/1.20.1/kubejs/server_scripts/gregification_helpers.js +++ b/packwiz/1.20.1/kubejs/server_scripts/gregification_helpers.js @@ -53,3 +53,23 @@ function gregifyDoorRecipe(event, recipePattern, id, materials) { B: "#forge:tools/saws", }); } + +function gregifyTrapdoorRecipe(event, recipePattern, id, materials) { + const [identifier, name] = id.split(":"); + const type = idToType(id); + + event.remove({ + id: recipePattern + .replace("", identifier) + .replace("", name) + .replace("", type), + }); + + if (!materials) materials = []; + if (materials.length === 0) materials.push(`${identifier}:${type}_slab`); + + event.shaped(Item.of(id, 1), ["WSW", "SSS", "WSW"], { + W: materials[0], + S: materials[1] || "minecraft:stick", + }); +} diff --git a/packwiz/1.20.1/kubejs/server_scripts/meadow/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/meadow/trapdoor.js new file mode 100755 index 0000000..b119616 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/meadow/trapdoor.js @@ -0,0 +1,14 @@ +// Modifies the recipes for trapdoors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyTrapdoorRecipe(event, ":", "meadow:pine_trapdoor", [ + "meadow:pine_planks", + ]); + + gregifyTrapdoorRecipe( + event, + ":", + "meadow:pine_barn_trapdoor", + ["meadow:pine_slab"] + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/minecraft/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/minecraft/trapdoor.js new file mode 100755 index 0000000..b9ce97c --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/minecraft/trapdoor.js @@ -0,0 +1,26 @@ +// Modifies the recipes for trapdoors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + [ + "minecraft:oak_trapdoor", + "minecraft:spruce_trapdoor", + "minecraft:birch_trapdoor", + "minecraft:jungle_trapdoor", + "minecraft:acacia_trapdoor", + "minecraft:dark_oak_trapdoor", + "minecraft:mangrove_trapdoor", + "minecraft:cherry_trapdoor", + "minecraft:bamboo_trapdoor", + "minecraft:crimson_trapdoor", + "minecraft:warped_trapdoor", + ].forEach((d) => gregifyTrapdoorRecipe(event, ":", d)); + + gregifyTrapdoorRecipe( + event, + ":", + "minecraft:iron_trapdoor", + ["gtceu:iron_plate", "#forge:rods/iron"] + ); + + event.remove({ id: "regions_unexplored:oak_trapdoor" }); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/quark/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/quark/trapdoor.js new file mode 100755 index 0000000..655daed --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/quark/trapdoor.js @@ -0,0 +1,16 @@ +// Modifies the recipes for trapdoors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + [ + "quark:ancient_trapdoor", + "quark:azalea_trapdoor", + "quark:blossom_trapdoor", + ].forEach((d) => + gregifyTrapdoorRecipe( + event, + "quark:world/crafting/woodsets//trapdoor", + d, + [`quark:${idToType(d)}_planks_slab`] + ) + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/regions_unexplored/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/regions_unexplored/trapdoor.js new file mode 100755 index 0000000..54cbaed --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/regions_unexplored/trapdoor.js @@ -0,0 +1,28 @@ +// Modifies the recipes for doors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + [ + "regions_unexplored:baobab_trapdoor", + "regions_unexplored:blackwood_trapdoor", + "regions_unexplored:blue_bioshroom_trapdoor", + "regions_unexplored:brimwood_trapdoor", + "regions_unexplored:cobalt_trapdoor", + "regions_unexplored:cypress_trapdoor", + "regions_unexplored:dead_trapdoor", + "regions_unexplored:eucalyptus_trapdoor", + "regions_unexplored:green_bioshroom_trapdoor", + "regions_unexplored:joshua_trapdoor", + "regions_unexplored:kapok_trapdoor", + "regions_unexplored:larch_trapdoor", + "regions_unexplored:magnolia_trapdoor", + "regions_unexplored:maple_trapdoor", + "regions_unexplored:mauve_trapdoor", + "regions_unexplored:palm_trapdoor", + "regions_unexplored:pine_trapdoor", + "regions_unexplored:pink_bioshroom_trapdoor", + "regions_unexplored:redwood_trapdoor", + "regions_unexplored:socotra_trapdoor", + "regions_unexplored:willow_trapdoor", + "regions_unexplored:yellow_bioshroom_trapdoor", + ].forEach((d) => gregifyTrapdoorRecipe(event, ":", d)); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/snowyspirit/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/snowyspirit/trapdoor.js new file mode 100755 index 0000000..c727173 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/snowyspirit/trapdoor.js @@ -0,0 +1,10 @@ +// Modifies the recipes for doors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyTrapdoorRecipe( + event, + ":", + "snowyspirit:gingerbread_trapdoor", + ["#snowyspirit:gingerbreads"] + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/supplementaries/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/supplementaries/trapdoor.js new file mode 100755 index 0000000..f2e7900 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/supplementaries/trapdoor.js @@ -0,0 +1,10 @@ +// Modifies the recipes for doors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyTrapdoorRecipe( + event, + ":", + "supplementaries:gold_trapdoor", + ["gtceu:gold_plate", "#forge:rods/gold"] + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/thermal/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/thermal/trapdoor.js new file mode 100755 index 0000000..322796e --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/thermal/trapdoor.js @@ -0,0 +1,9 @@ +// Modifies the recipes for doors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyTrapdoorRecipe( + event, + ":", + "thermal:rubberwood_trapdoor" + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/vinery/trapdoor.js b/packwiz/1.20.1/kubejs/server_scripts/vinery/trapdoor.js new file mode 100755 index 0000000..7727a60 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/vinery/trapdoor.js @@ -0,0 +1,9 @@ +// Modifies the recipes for doors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyTrapdoorRecipe( + event, + ":", + "vinery:dark_cherry_trapdoor" + ); +});