Skip to content

Command

Block Condition Type

Compares the result of the specified command to the specified value.

Type ID: eggolib:command

Caution

This block condition type is only effective server-side. This means that client-side power types won't be able to evaluate this properly.

Fields

Field Type Default Description
command String The command to execute.
comparison Comparison ">=" Determines how the result of the command is compared to a value.
compare_to Integer 1 The value to compare the result of the command to.

Examples

"block_condition": {
    "type": "eggolib:command",
    "command": "execute if entity @e[type = minecraft:creeper, distance = ..4]"
}

This example will check if there are 1 or more Creepers at the position of the block the block condition type is evaluated on.