Skip to main content

Predicate (Entity Condition Type)

Checks whether the entity passes a vanilla predicate.

Type ID: apoli:predicate

warning

This condition only works on the server, so it can't be used in fields that are evaluated on the client.

Fields

FieldTypeDefaultDescription
predicateIdentifierrequiredThe ID of the predicate the entity must pass.

Examples

"condition": {
    "type": "apoli:predicate",
    "predicate": "example:weather/is_thunderstorm"
}

This checks whether the example:weather/is_thunderstorm predicate passes. On 1.21.1 the file is data/example/predicate/weather/is_thunderstorm.json, and on 1.20.1 the folder is predicates. The predicate itself looks like this:

{
    "condition": "minecraft:weather_check",
    "raining": true,
    "thundering": true
}