Skip to content

Entity Active Effects

Provides the count of active status effects of an entity.

Type ID: kaya:entity/active_effects

Info

This type provides the following context parameters to its condition when counting the status effects of an entity:

Parameter Description
kaya:active_effect The active status effect instance of an entity.

Format

Field Type Default Description
condition Condition optional If specified, this condition will be checked to each status effect when counting them.
entity Entity Provider The entity to get the status effects from.

Example

{
    "type": "kaya:entity/active_effects",
    "condition": {
        "type": "kaya:is_effect_in_tag",
        "tag": "#example:is_harmful"/*(1)!*/,
        "effect": "active_effect"
    },
    "entity": "this"
}
  1. The location of the file is data/example/tags/mob_effect/is_harmful.json

This example will provide the count of status effects that are included in the #example:is_harmful status effect tag from the entity provided by the kaya:this_entity context parameter.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.