Modify Attribute
Modifies an attribute using Attribute Modifiers.
Type ID: origins:modify_attribute
Note
This power type uses a different modifier system than the Attribute (Power Type) and the Conditioned Attribute (Power Type).
Note
Refer to the Minecraft Wiki: Attribute page for a list of vanilla attributes that you can modify.
Fields
Field | Type | Value | Description |
---|---|---|---|
attribute |
Identifier | The namespace and ID of the attribute to apply the modifier(s) to. | |
modifier |
Attribute Modifier | optional | If specified, this modifier will be applied to the specified attribute. |
modifiers |
Array of Attribute Modifiers | optional | If specified, these modifiers will be applied to the specified attribute. |
Examples
{
"type": "origins:modify_attribute",
"attribute": "minecraft:generic.attack_damage",
"modifier": {
"operation": "set_total",
"resource": "example:resource",
"value": 0
}
}
This example will set the total value of the entity's minecraft:generic.attack_damage
attribute using the value of the example:resource
(data/example/powers/resource.json
) power.