Attribute

Power Type

Applies one or more attribute modifiers.

Type ID: origins:attribute

Caution

This power type does not support a condition. If the condition field is present, it will be ignored. If you wish to check for an entity condition before applying the attribute modifier(s), you can use the Conditioned Attribute power type instead.

Fields

Field Type Default Description
modifier Attributed Attribute Modifier optional If specified, this modifier will be applied to its corresponding attribute.
modifiers Array of Attributed Attribute Modifiers optional If specified, these modifiers will be applied to their corresponding attributes.
update_health Boolean true When true, the player's health percentage will update to match their new maximum health.

Examples

{
    "type": "origins:attribute",
    "modifier": {
        "name": "Max health increase",
        "attribute": "minecraft:generic.max_health",
        "value": 4,
        "operation": "addition"
    }
}

This example will increase the entity's maximum health by 2 hearts.