Attribute (Entity Condition Type)

Applies a check towards a specific attribute value of the entity.

Applies a check towards a specific attribute value of the entity.

Type ID: apoli:attribute

Fields

FieldTypeDefaultDescription
attributeIdentifierID of the attribute of which the value should be checked. See Minecraft Wiki: Attribute (Attributes) for a list of vanilla attributes that can be checked for.
comparisonComparisonDetermines how the attribute’s total value should be compared to the specified value.
compare_toFloatThe value at which the attribute’s total value will be compared to.

Examples

"condition": {
    "type": "apoli:attribute",
    "attribute": "minecraft:generic.armor",
    "comparison": ">=",
    "compare_to": 10.0
}

This example will check if the value of the entity’s minecraft:generic.armor attribute is 10 or more.