Equipped Enchantment Level
Provides the level of an enchantment from items equipped by an entity.
Type ID: kaya:equipped_enchantment_level
Format
| Field | Type | Default | Description |
|---|---|---|---|
enchantment |
Identifier | The ID of the enchantment. | |
slot_group |
Equipment Slot Group | "any" |
The group of equipment slots to check. |
calculation |
Calculation | "max" |
Determines how the level of the enchantment from equipped items is calculated. |
entity |
Entity Provider | The entity get the equipped items from. |
Calculation
A string that determines how the level of an enchantment from multiple items is calculated.
Values
| Value | Description |
|---|---|
sum |
Provides the sum of all the levels of the enchantment from multiple items. |
max |
Provides the highest level of the enchantment from multiple items. |
Example
{
"type": "kaya:equipped_enchantment_level",
"enchantment": "minecraft:protection",
"entity": "this"
}
This example provides the highest level of the minecraft:protection enchantment from all the items equipped by the entity provided by the kaya:this_entity context parameter.
History
| Minecraft | Mod | Changelog |
| 1.21.5 | 0.1.0 | Added the type. |