Structure
Use the structure requirement
//Only requires the structure
.requireStructure(pattern, keys)
//Destroys the structure (DON'T drop the blocks)
.destroyStructure(pattern, keys)
//Break the structure (drop the blocks)
.breakStructure(pattern, keys)
//Place the structure (drops the replaced blocks)
.placeStructure(String[][] pattern, Map<char, String> keys, true)
//Place the structure (DON'T drop the replaced blocks)
.placeStructure(String[][] pattern, Map<char, String> keys, false)Example
ServerEvents.recipes(event => {
event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
.requireStructure([[
"aaa",
"a a",
"aaa",
" m "
]], {"a": "minecraft:stone"})
})Last updated