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
954 B
23 lines
954 B
// priority: 0 |
|
|
|
onEvent("recipes", event => { |
|
// For each slab crafting recipe that outputs 6x slabs, ... |
|
event.forEachRecipe({ id: /slab/, type: "minecraft:crafting_shaped" }, recipe => { |
|
if (recipe.outputItems[0].getCount() != 6) return; |
|
|
|
let input = recipe.inputItems[0]; |
|
let output = recipe.outputItems[0].getId(); |
|
|
|
// We disable the Immersive Engineering storage block slabs in "immersive_engineering.js". |
|
if (/^immersiveengineering:slab_storage_/.test(output)) return; |
|
// Quark limestone is disabled but some recipes still linger. |
|
if (/^quark:.*limestone.*$/.test(output)) return; |
|
|
|
// ... add a recipe to craft slabs in 2x2 crafting grid. |
|
event.shaped("4x " + output, [ "BB" ], { B: input }); |
|
// For this to work, "pressure_plates_use_stabs.json" must also be present. |
|
|
|
// ... add a back-crafting recipe to turn 2x slab => 1x block. |
|
event.shaped(input, [ "S ", " S" ], { S: output }); |
|
}); |
|
});
|
|
|