-
Notifications
You must be signed in to change notification settings - Fork 0
Function: clear area
theblackswitch edited this page May 15, 2026
·
2 revisions
#mtb-generated:<namespace>/<multiblock_id>/clear_area
Clear all blocks from the multiblock.
This function needs to run as the root of the multiblock instance you want to build.
Note
You can use the selector @e[type=minecraft:block_display,tag=<namespace>-<multiblock_id>,tag=mtb.root] to find the root
# Undo creative placement if the player made a mistake and clicks in their schematic menu
# The implementing datapack uses a player ID system to link the multiblocks with the player
scoreboard players operation #search tbs.ID = @s tbs.ID
execute if score @s[gamemode=creative] schematic.menu matches 0 if score @s schematic.click matches 1.. as @e[type=minecraft:block_display,tag=tech_datapack-industrial_furnace,tag=mtb.root,tag=td.currently_placing,predicate=tech_datapack:match_player_id] run function #mtb-generated:tech_datapack/industrial_furnace/clear_areawiki written by ~theblackswitch