Conditioned Attribute
Applies one or more attribute modifiers; may depend on a condition
.
Type ID: origins:conditioned_attribute
Note
You can use the Attribute (Power Type) if an entity condition is not needed.
Note
Refer to the Minecraft Wiki: Attribute page for a list of vanilla attributes that you can modify.
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. |
tick_rate |
Integer | 20 |
The frequency (in ticks) with which to check the condition. Lower values mean the condition changes are detected more quickly, but this comes at a potentially huge performance cost. |
update_health |
Boolean | true |
Determines whether the health percentage will update to match the entity's new maximum health. |
Examples
{
"type": "origins:conditioned_attribute",
"modifier": {
"attribute": "minecraft:generic.movement_speed",
"operation": "addition",
"value": 0.4,
"name": "Increased sprinting speed"
},
"tick_rate": 20,
"condition": {
"type": "origins:sprinting"
}
}
This example power will add 0.4 to the entity's minecraft:generic.movement_speed
attribute if the entity is sprinting.