forked from copygirl/heck
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.
23 lines
842 B
23 lines
842 B
// priority: 0 |
|
|
|
onEvent("recipes", event => { |
|
// For each stair crafting recipe that outputs 4x stairs, ... |
|
event.forEachRecipe({ id: /stairs/, type: "minecraft:crafting_shaped" }, recipe => { |
|
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; |
|
|
|
// ... 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 ]); |
|
}); |
|
});
|
|
|