Skip to main content

Get 25% OFF on your first order with BisectHosting using code "DAQEM"!

Enchant Item

The arc:enchant_item reward type applies enchantments to an item in a specific slot.

Parameters

ParameterTypeRequiredDefaultDescription
enchantmentsArcEnchantment[]Required-No default valueList of enchantments to apply.
targetArcItemTargetRequired-No default valueTarget item slot.

Example

The following example enchants the held item with Sharpness 1 when killing a mob.

data/my_datapack/arc/blood_lust.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_kill_entity",
"rewards": [
{
"type": "arc:enchant_item",
"target": "MAIN_HAND",
"enchantments": [
{
"id": "minecraft:sharpness",
"level": 1
}
]
}
]
}

Compatible Action Types