Skip to main content

Eat

The arc:on_eat action type is triggered when a player eats 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.

Example

The following example will give the player a Hunger effect for 10 seconds when they eat a Golden Apple.

data/my_datapack/arc/hunger_on_eat.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_eat",
"conditions": [
{
"type": "arc:item",
"item": {
"id": "minecraft:golden_apple"
}
}
],
"rewards": [
{
"type": "arc:effect",
"effect": {
"id": "minecraft:hunger",
"duration": 200,
"amplifier": 0,
"show_particles": false,
"show_icon": false
}
}
]
}

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: