Skip to main content

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

FieldTypeDefaultDescription
attributeIdentifierrequiredThe attribute every modifier applies to.
modifierAttribute ModifieroptionalA single modifier.
modifiersArray of Attribute ModifieroptionalSeveral modifiers.
update_healthBooleantrueScales 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
    }
  ]
}