Attribute Linked Resource
Provides a variable who's value is given by the provided value of the selected Attribute Value from the specified Attribute.
Type ID: origins-math:attribute_linked_resource
Warning
Attribute values are normally stored as a Float, but Resources have to be stored as an Integer. Therefore, you should be cautious when using this power as a resource, as the value will have it's decimal counterpart removed, effectively being truncated, when doing so.
If you are using this resource as a variable to either the Math Resource (Power Type) or the Variable Change Resource (Entity Action Type), then it's Float counterpart is used instead.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
attribute |
Identifier | The ID of the attribute that this power will base it's value from. | |
value |
Attribute Value | "TOTAL" |
The specific value of "attribute" this power will take. |
Examples
{
"type": "origins-math:attribute_linked_resource",
"attribute": "minecraft:generic.attack_speed",
"value": "TOTAL"
}
This example will use the player's current attack speed as it's value.
{
"type": "origins-math:attribute_linked_resource",
"attribute": "minecraft:generic.attack_speed",
"value": "BASE"
}
This example will use the player's base attack speed as it's value, which is 4.