Hand
The arc:hand condition type checks which hand was used to perform an interaction.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
hand | InteractionHand | ✅Required | - | MAIN_HAND or OFF_HAND. |
Example
The following example only allows a specific interaction if done with the off-hand.
data/my_datapack/arc/offhand_interact.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_interact_block",
"conditions": [
{
"type": "arc:hand",
"hand": "OFF_HAND"
}
],
"rewards": [
{
"type": "arc:command",
"command": "say You used your off-hand!"
}
]
}
Compatible Action Types
🖱️ On Interact Block
The arc:oninteractblock action type is triggered when a player interacts with a block, such as right-clicking it.
🖱️ On Interact Entity
The arc:oninteractentity action type is triggered when a player interacts with an entity, such as right-clicking it.
🪵 On Strip Log
The arc:onstriplog action type is triggered when a player strips a log or wood block using an axe.
🖱️ On Use Item
The arc:onuseitem action type is triggered when a player uses an item (right-clicks with an item).