Skip to main content

Use Anvil

The arc:on_use_anvil action type is triggered when a player uses an anvil to repair or rename 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:itemRefers to a single item type without stack information.

Example

The following example will give the player an anvil every time they use an anvil.

data/my_datapack/arc/give_anvil.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_use_anvil",
"conditions": [],
"rewards": [
{
"type": "arc:item",
"item": {
"id": "minecraft:anvil"
}
}
]
}

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: