Skip to content

Function: build structure

theblackswitch edited this page May 15, 2026 · 2 revisions

#mtb-generated:<namespace>/<multiblock_id>/build_structure

Fully complete the multiblock by physically placing all the blocks.

Context:

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

Example:

# Creative place the blueprint when the player 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 1 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/place_structure

Clone this wiki locally