Skip to content

Function: check conditions

theblackswitch edited this page May 15, 2026 · 2 revisions

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

This function is used to check if all the additional conditions are true.

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:

conditions met: 1 if all conditions are met, else fail

Example:

# Run a particle command while the multiblock is completed (run as the multiblock root)

execute store result #conditions temp run function #mtb-generated:tech_datapack/industrial_furnace/check_conditions
execute store result #progress temp run function #mtb-generated:tech_datapack/industrial_furnace/get_progress
execute store result #block_count temp run function #mtb-generated:tech_datapack/industrial_furnace/get_block_count

execute if score #conditions temp matches 1 if score #progress temp = #block_count temp run particle happy_villager ~ ~ ~ 

Clone this wiki locally