Enchantment
Checks the level of a certain enchantment, or the amount of individual enchantments on the item.
Type ID: origins:enchantment
Fields
Field | Type | Default | Description |
---|---|---|---|
enchantment |
Identifier | optional | If specified, the level of the enchantment that corresponds to this identifier will be compared. Otherwise, the amount of enchantments in the item stack will be compared instead. |
use_modifications |
Boolean | true |
Determines whether to account for enchantments that were added/modified by unnatural means (e.g: via the Modify Enchantment Level (Power Type).) |
comparison |
Comparison | Determines how the level of the specified enchantment, or the amount of enchantments in the item stack, should be compared to the specified value. | |
compare_to |
Integer | The value at which the level of the specified enchantment, or the amount of the enchantments in the item stack, will be compared to. |
Examples
"item_condition": {
"type": "origins:enchantment",
"enchantment": "minecraft:fortune",
"comparison": "==",
"compare_to": 3
}
This example will check if the item has the Fortune III enchantment.
"item_condition": {
"type": "origins:enchantment",
"comparison": ">=",
"compare_to": 3
}
This example will check if the item has 3 or more enchantments.