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 Type | Description |
|---|---|
arc:item_stack | Represents 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.
{
"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:
🌍 Dimension
The arc:dimension condition type checks if the player is in a specific dimension.
🪙 Item
The arc:item condition type checks if an item matches a specific item, including optional checks for count and components.
🪙✅ Item Equipped
The arc:item_equipped condition type checks if the player has a specific item equipped in any armor slot.
🪙✋ Item In Hand
The arc:iteminhand condition type checks if the player is holding a specific item in their main hand, off-hand, or either hand.
🪙📦 Item In Inventory
The arc:itemininventory condition type checks if the player has a specific item anywhere in their main inventory.
🪙🪙 Items
The arc:items condition type checks if an item is one of several specified items or belongs to a specified item tag.
🚫 Not
The arc:not condition type inverts the result of its nested conditions. It is met if none of the specified conditions are met.
🔀 Or
The arc:or condition type is met if at least one of its nested conditions is met.
📋 Scoreboard
The arc:scoreboard condition type checks if a player's score in a specific objective is within a given range.
👥 Team
The arc:team condition type checks if a player is on a specific scoreboard team.
Compatible Reward Types
The following reward types can be used with this action type:
💻 Command
The arc:command reward type executes a server command.
✨ Experience
The arc:exp reward type gives the player a specified range of experience points.
🪙 Item
The arc:item reward type gives an item directly to the player's inventory.
💉 Potion Effect
The arc:effect reward type applies a potion effect to the player.