Skip to content

Function: is blueprint visible

theblackswitch edited this page May 15, 2026 · 2 revisions

#mtb-generated:<namespace>/<multiblock_id>/outline/is_visible

This function is used to check whether the multiblock is currently showing it's blueprint.

Context:

This function needs to run as the root of the multiblock instance you want inspect.

Note

You can use the selector @e[type=minecraft:block_display,tag=<namespace>-<multiblock_id>,tag=mtb.root] to find the root

Return:

visible: 1 when blueprint is visible, else fail

Example:

# Play a sound when the player toggles the blueprint of this multiblock (run as the multiblock root)

execute store success score #blueprint temp run function #mtb-generated:tech_datapack/industrial_furnace/blueprint/is_visible

execute if entity @s[tag=td.blueprint] if score #blueprint temp matches 0 run playsound minecraft:block.crafter.fail master @a ~ ~ ~ 1 0.5
execute if entity @s[tag=!td.blueprint] if score #blueprint temp matches 1 run playsound minecraft:block.crafter.fail master @a ~ ~ ~ 1 0.7

execute if #blueprint temp matches 1 run tag @s add td.blueprint
execute if #blueprint temp matches 0 run tag @s remove td.blueprint

Clone this wiki locally