Skip to main content

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

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.
arc:worldRefers to the world/dimension where the action occurs.
arc:block_positionSpecifies the coordinates (x, y, z) of a block in the world.
arc:exp_levelIndicates the amount of experience levels used by an action.

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: