Skip to content

Modify Enchantment Level

Power Type

Modifies the entity's enchantment levels.

Type ID: apugli:modify_enchantment_level

Fields

Field Type Default Description
enchantment Identifier The enchantment to apply to the entity.
item_condition Item Condition Type optional If set, the modifier(s) will only apply to items that meet this condition.
modifier Attribute Modifier optional If set, this modifier will apply to the entity's enchantment levels for the enchantment specified by the enchantment field.
modifiers Array of Attribute Modifiers optional If set, these modifiers will apply to the entity's enchantment levels for the enchantment specified by the enchantment field.

Examples

{
    "type": "apugli:modify_enchantment_level",
    "enchantment": "minecraft:fortune",
    "modifiers": [
        {
            "operation": "addition",
            "value": 1
        },
        {
            "operation": "multiply_total",
            "value": 2
        }
    ]
}

This example gives the entity 1 level of Fortune and then multiplies this new value by 2.