Enchantment
Checks the level of an enchantment on the entity's equipment.
Type ID: origins:enchantment
Fields
Field | Type | Default | Description |
---|---|---|---|
enchantment |
Identifier | The namespace and ID of the enchantment of interest. | |
calculation |
String | "sum" |
Which number to compare - either the sum of levels of this enchantment on all of the player's equipment, or the max level of this enchantment on any of the player's equipment. |
comparison |
Comparison | How the enchantment level should be compared to the specified value. | |
compare_to |
Integer | The value to compare the enchantment level to. |
Examples
"condition": {
"type": "origins:enchantment",
"enchantment": "minecraft:protection",
"calculation": "sum",
"comparison": ">=",
"compare_to": 16
}
This condition will check whether the entity is wearing a full set of Protection IV armor (or better, which might be possible with mods).