Sum
Adds all the number values and uses the sum as the provided number value.
Type ID: kaya:sum
Note
This number meta type can only provide the same kind of value of the field where it was used. (e.g: if the field is a float provider, the number provider to specify should be a float provider or if the field is an int provider, the number provider to specify should be an int provider)
Format
| Field | Type | Default | Description |
|---|---|---|---|
values |
Array of Number Providers | The numbers to get the sum of. |
Example
{
"type": "kaya:sum",
"values": [
{
"type": "kaya:equipped_enchantment_level",
"enchantment": "minecraft:fortune",
"slot_group": "any",
"entity": "this"
},
1
]
}
This example is an int provider that will provide the highest level of the minecraft:fortune enchantment of the equipped items from the entity provided by the kaya:this_entity context parameter + $1$.
$(Value = EnchantmentLevel + 1)$
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |