Modify Attribute (Power Type)
Applies modifiers to one attribute. apoli:modify_attribute is a legacy alias of apoli:attribute. The only difference is that the attribute is written once at the top level instead of inside each modifier, and Apoli copies it into the modifiers for you.
Type ID: apoli:modify_attribute
Fields
| Field | Type | Default | Description |
|---|---|---|---|
attribute | Identifier | required | The attribute every modifier applies to. |
modifier | Attribute Modifier | optional | A single modifier. |
modifiers | Array of Attribute Modifier | optional | Several modifiers. |
update_health | Boolean | true | Scales current health with max health when the attribute is minecraft:generic.max_health. |
Several attributes at once
apoli:attribute lets each modifier name its own attribute, so one power can change several attributes, which apoli:modify_attribute can't do:
{
"type": "apoli:attribute",
"modifiers": [
{
"attribute": "minecraft:generic.max_health",
"operation": "multiply_base_multiplicative",
"value": -0.4
},
{
"attribute": "minecraft:generic.movement_speed",
"operation": "multiply_base_multiplicative",
"value": 0.2
}
]
}