Skip to main content

Drink

The arc:on_drink action type is triggered when a player drinks an item (e.g., potion, milk bucket, etc.).

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 Night Vision effect for 60 minutes when they drink a Potion of Night Vision.

data/my_datapack/arc/night_vision_on_drink.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_drink",
"conditions": [
{
"type": "arc:item",
"item": {
"id": "minecraft:potion",
"components": {
"minecraft:potion_contents": {
"potion": "minecraft:night_vision"
}
}
}
}
],
"rewards": [
{
"type": "arc:effect",
"effect": {
"id": "minecraft:night_vision",
"duration": 72000,
"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: