Skip to main content

Interact With Entity

The arc:on_interact_entity action type is triggered when a player interacts with an entity, such as right-clicking it.

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:entityRepresents an entity in the game, such as a player, mob, or item.

Example

The following example will give the player a diamond every time they shear a sheep.

data/my_datapack/arc/diamond_for_shearing_sheep.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_interact_entity",
"conditions": [
{
"type": "arc:entity_type",
"entity_type": "minecraft:sheep"
},
{
"type": "arc:ready_for_shearing"
}
],
"rewards": [
{
"type": "arc:item",
"item": {
"id": "minecraft:diamond"
}
}
]
}

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: