Well-rounded Minecraft 1.18.2 modpack featuring Tech, Magic, Exploration and Decoration content. Made with love. 💚
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
842 B

2 years ago
// priority: 0
onEvent("recipes", event => {
// For each stair crafting recipe that outputs 4x stairs, ...
event.forEachRecipe({ id: /stairs/, type: "minecraft:crafting_shaped" }, recipe => {
2 years ago
if (recipe.outputItems[0].getCount() != 4) return;
let input = recipe.inputItems[0];
let output = recipe.outputItems[0].getId();
// Quark limestone is disabled but some recipes still linger.
if (/^quark:.*limestone.*$/.test(output)) return;
2 years ago
// ... modify the output to return 6x instead of 4x.
recipe.replaceOutput(output, "6x " + output, false, (out, orig) => out);
// ... add a recipe to craft stairs in 2x2 crafting grid.
event.shaped("3x " + output, [ "B ", "BB" ], { B: input });
// ... add a back-crafting recipe to turn 1x stair => 1x block.
event.shapeless(input, [ output ]);
});
});