Skip to main content

Enchant Item

The arc:on_enchant_item action type is triggered when a player enchants an item.

Action Data

When this action is triggered, the following action data is made available to be used by conditions and rewards:

Action Data TypeDescription
arc:item_stackRepresents a stack of items, including item type and quantity.
arc:exp_levelIndicates the amount of experience levels used by an action.

Example

The following example will give the player an emerald every time they enchant an axe.

data/my_datapack/arc/fish_for_emerald.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_enchant_item",
"conditions": [
{
"type": "arc:items",
"items": ["#minecraft:axes"]
}
],
"rewards": [
{
"type": "arc:item",
"item": {
"id": "minecraft:emerald"
}
}
]
}

Compatible Condition Types

The following condition types can be used with this action type:

Compatible Reward Types

The following reward types can be used with this action type: