Enchantment (Item Condition Type)

Checks the level of a certain enchantment, or the amount of individual enchantments on the item.

Checks the level of a certain enchantment, or the amount of individual enchantments on the item.

Type ID: apoli:enchantment

Fields

FieldTypeDefaultDescription
enchantmentIdentifieroptionalIf 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_modificationsBooleantrueDetermines whether to account for enchantments that were added/modified by unnatural means (e.g: via the apoli:modify_enchantment_level)
comparisonComparisonDetermines how the level of the specified enchantment, or the amount of enchantments in the item stack, should be compared to the specified value.
compare_toIntegerThe 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": "apoli:enchantment",
    "enchantment": "minecraft:fortune",
    "comparison": "==",
    "compare_to": 3
}

This example will check if the item has the Fortune III enchantment.

"item_condition": {
    "type": "apoli:enchantment",
    "comparison": ">=",
    "compare_to": 3
}

This example will check if the item has 3 or more enchantments.