Skip to main content

Command (Block Condition Type)

Runs a command at the block's position and compares its result with a number.

Type ID: apoli:command

Fields

FieldTypeDefaultDescription
commandStringrequiredThe command to run.
comparisonComparisonrequiredHow the command's result, an integer, is compared with compare_to.
compare_toIntegerrequiredThe number the result is compared with.

Examples

"block_condition": {
    "type": "apoli:command",
    "command": "execute align xyz if entity @e[dy=0,dx=0,dz=0]",
    "comparison": ">=",
    "compare_to": 1
}

This checks whether there is an entity inside the block.