Skip to main content

Attribute (Entity Condition Type)

Compares the total value of one of the entity's attributes with a number.

Type ID: apoli:attribute

Fields

FieldTypeDefaultDescription
attributeIdentifierrequiredThe ID of the attribute to check. Minecraft Wiki: Attribute (Attributes) lists the vanilla attributes.
comparisonComparisonrequiredHow the attribute's total value is compared with compare_to.
compare_toFloatrequiredThe number the attribute's total value is compared with.

Examples

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

This checks whether the entity's minecraft:generic.armor attribute is 10 or more.