diff --git a/packwiz/1.20.1/kubejs/server_scripts/ad_astra/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/ad_astra/buttons.js new file mode 100755 index 0000000..1da19a3 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/ad_astra/buttons.js @@ -0,0 +1,20 @@ +// Modifies the recipes for buttons to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + ["ad_astra:glacian_button"].forEach((d) => + gregifyButtonRecipe(event, ":", d) + ); + + [ + "ad_astra:iron_plating_button", + "ad_astra:steel_plating_button", + "ad_astra:desh_plating_button", + "ad_astra:ostrum_plating_button", + "ad_astra:calorite_plating_button", + ].forEach((d) => + gregifyButtonRecipe(event, ":", d, [ + `ad_astra:${idToType(d)}`, + "#forge:tools/hammers", + ]) + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/aether/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/aether/buttons.js new file mode 100755 index 0000000..1c2d3d5 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/aether/buttons.js @@ -0,0 +1,10 @@ +// Modifies the recipes for trapdoors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyButtonRecipe(event, ":", "aether:skyroot_button"); + + gregifyButtonRecipe(event, ":", "aether:holystone_button", [ + `aether:holystone`, + "#forge:tools/hammers", + ]); +}); 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 a505e7c..be734b6 100755 --- a/packwiz/1.20.1/kubejs/server_scripts/gregification_helpers.js +++ b/packwiz/1.20.1/kubejs/server_scripts/gregification_helpers.js @@ -73,3 +73,23 @@ function gregifyTrapdoorRecipe(event, recipePattern, id, materials) { S: materials[1] || "minecraft:stick", }); } + +function gregifyButtonRecipe(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}_planks`); + + event.shaped(Item.of(id, 6), [" ", "SW ", " "], { + W: materials[0], + S: materials[1] || "#forge:tools/saws", + }); +} diff --git a/packwiz/1.20.1/kubejs/server_scripts/gtceu/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/gtceu/buttons.js new file mode 100755 index 0000000..aff15da --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/gtceu/buttons.js @@ -0,0 +1,7 @@ +// Modifies the recipes for buttons to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + ["gtceu:rubber_button", "gtceu:treated_wood_button"].forEach((d) => + gregifyButtonRecipe(event, ":shapeless/", d) + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/meadow/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/meadow/buttons.js new file mode 100755 index 0000000..f725427 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/meadow/buttons.js @@ -0,0 +1,5 @@ +// Modifies the recipes for trapdoors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyButtonRecipe(event, ":", "meadow:pine_button"); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/minecraft/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/minecraft/buttons.js new file mode 100755 index 0000000..cf2716f --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/minecraft/buttons.js @@ -0,0 +1,27 @@ +// Modifies the recipes for buttons to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + [ + "minecraft:oak_button", + "minecraft:spruce_button", + "minecraft:birch_button", + "minecraft:jungle_button", + "minecraft:acacia_button", + "minecraft:dark_oak_button", + "minecraft:mangrove_button", + "minecraft:cherry_button", + "minecraft:bamboo_button", + "minecraft:crimson_button", + "minecraft:warped_button", + ].forEach((d) => gregifyButtonRecipe(event, ":", d)); + + ["minecraft:stone_button", "minecraft:polished_blackstone_button"].forEach( + (d) => + gregifyButtonRecipe(event, ":", d, [ + `minecraft:${idToType(d)}`, + "#forge:tools/hammers", + ]) + ); + + event.remove({ id: "regions_unexplored:oak_button" }); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/quark/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/quark/buttons.js new file mode 100755 index 0000000..fad9608 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/quark/buttons.js @@ -0,0 +1,11 @@ +// Modifies the recipes for buttons to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + [ + "quark:ancient_button", + "quark:azalea_button", + "quark:blossom_button", + ].forEach((d) => + gregifyButtonRecipe(event, "quark:world/crafting/woodsets//button", d) + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/regions_unexplored/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/regions_unexplored/buttons.js new file mode 100755 index 0000000..85d8db9 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/regions_unexplored/buttons.js @@ -0,0 +1,28 @@ +// Modifies the recipes for buttons to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + [ + "regions_unexplored:baobab_button", + "regions_unexplored:blackwood_button", + "regions_unexplored:blue_bioshroom_button", + "regions_unexplored:brimwood_button", + "regions_unexplored:cobalt_button", + "regions_unexplored:cypress_button", + "regions_unexplored:dead_button", + "regions_unexplored:eucalyptus_button", + "regions_unexplored:green_bioshroom_button", + "regions_unexplored:joshua_button", + "regions_unexplored:kapok_button", + "regions_unexplored:larch_button", + "regions_unexplored:magnolia_button", + "regions_unexplored:maple_button", + "regions_unexplored:mauve_button", + "regions_unexplored:palm_button", + "regions_unexplored:pine_button", + "regions_unexplored:pink_bioshroom_button", + "regions_unexplored:redwood_button", + "regions_unexplored:socotra_button", + "regions_unexplored:willow_button", + "regions_unexplored:yellow_bioshroom_button", + ].forEach((d) => gregifyButtonRecipe(event, ":", d)); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/thermal/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/thermal/buttons.js new file mode 100755 index 0000000..3f7dc33 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/thermal/buttons.js @@ -0,0 +1,9 @@ +// Modifies the recipes for doors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyButtonRecipe( + event, + ":", + "thermal:rubberwood_button" + ); +}); diff --git a/packwiz/1.20.1/kubejs/server_scripts/vinery/buttons.js b/packwiz/1.20.1/kubejs/server_scripts/vinery/buttons.js new file mode 100755 index 0000000..9dc62a4 --- /dev/null +++ b/packwiz/1.20.1/kubejs/server_scripts/vinery/buttons.js @@ -0,0 +1,9 @@ +// Modifies the recipes for doors to match the Gregified Integrations recipes + +ServerEvents.recipes((event) => { + gregifyButtonRecipe( + event, + ":", + "vinery:dark_cherry_button" + ); +});