// priority: 0 onEvent("recipes", event => { // Get all (non-weighted) pressure plates and replace their input with slabs instead of blocks. event.forEachRecipe({ id: /pressure_plate/, type: "minecraft:crafting_shaped" }, recipe => { if (recipe.getPath().contains("_weighted_")) return; if (recipe.getId() == "quark:automation/crafting/obsidian_pressure_plate") return; let oldInput = recipe.inputItems[0].getId(); let newInput = oldInput + "_slab"; // Most mods will just call their slabs "_slab" but some still append "_planks" and such. let mod = recipe.getMod(); if ((mod != "malum") && (mod != "tconstruct") && (mod != "quark")) newInput = newInput.replace("_block", "").replace("_planks", ""); recipe.replaceInput(oldInput, newInput, false); }); // Do the same for Twilight Forest's pressure plates (which use "_plate" in their recipe name). event.forEachRecipe({ id: /^twilightforest:.*_plate$/, type: "minecraft:crafting_shaped" }, recipe => { let oldInput = recipe.inputItems[0].getId(); let newInput = oldInput.replace("_planks", "_slab"); recipe.replaceInput(oldInput, newInput, false); }); });