Command

Entity Condition Type

Stores the result of the specified command, and compares the stored result to a specified value.

Type ID: origins:command

Caution

This condition is only effective server-side. That means client-side power types such as origins:climbing, origins:entity_glow, origins:shader, etc. won't work with this.

Fields

Field Type Default Description
command String The command to execute.
comparison Comparison How to compare the stored result of the specified command to the specified value.
compare_to Integer The value to compare the stored result of the specified command to.

Examples

"condition": {
    "type": "origins:command",
    "command": "execute if score @s objective1 = @s objective2",
    "comparison": "==",
    "compare_to": 1
}

This example will check if the entity has the same score in the objective1 and objective2 scoreboard objectives.

"condition": {
    "type": "origins:command",
    "command": "execute if entity @e[type = #minecraft:skeletons, distance = ..64]",
    "comparison": ">=",
    "compare_to": 4
}

This example will check if there are 4 or more entities that are included in the #minecraft:skeletons (data/minecraft/tags/entity_types/skeletons.json) entity type tag within a 64 blocks spherical radius relative to the entity.