Item
The arc:item condition type checks if an item matches a specific item, including optional checks for count and components.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
item | Item | ✅Required | - | The item to check. |
check_components | boolean | ❌Optional | true | Whether to check item components. |
Example
The following example gives the player a speed boost when they drink a Potion of Swiftness.
{
"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:swiftness"
}
}
}
}
],
"rewards": [
{
"type": "arc:effect_amplifier_addition",
"addition": 1
}
]
}
Compatible Action Types
🧪 On Brew Potion
The arc:onbrewpotion action type is triggered when a player brews a potion.
🛠️ On Craft Item
The arc:oncraftitem action type is triggered when a player crafts an item.
🥤 On Drink
The arc:on_drink action type is triggered when a player drinks an item (e.g., potion, milk bucket, etc.).
🪣 On Drop Item
The arc:ondropitem action type is triggered when a player drops an item.
🍽️ On Eat
The arc:on_eat action type is triggered when a player eats an item.
✨ On Enchant Item
The arc:onenchantitem action type is triggered when a player enchants an item.
🎣 On Fished Up Item
The arc:onfishedup_item action type is triggered when a player fishes up an item.
⚔️ On Get Attack Speed
The arc:getattackspeed action type is used to retrieve the attack speed of a player.
⚡ On Get Destroy Speed
The arc:ongetdestroy_speed action type is triggered when a player is determining how quickly they can break a block. This action type allows you to modify the destroy speed based on various conditions.
🗡️ On Hurt Item
The arc:onhurtitem action type is triggered when a player hurts/damages an item.
🖱️ On Interact Entity
The arc:oninteractentity action type is triggered when a player interacts with an entity, such as right-clicking it.
🏹 On Shoot Projectile
The arc:onshootprojectile action type is triggered when a player shoots a projectile, such as an arrow or a snowball.
🔥 On Smelt Item
The arc:onsmeltitem action type is triggered when a player takes an item out of a furnace, smoker, or blast furnace. Just like experience orbs in vanilla Minecraft, this action also counts the items that are taken out with a hopper. As long as the player takes out one of the smelted items, the action will be triggered. The action is called for every item smelted individually, regardless of how many are taken out at once.
🏹 On Throw Item
The arc:onthrowitem action type is triggered when a player throws an item (e.g. snowball, egg, ender pearl).
⚒️ On Use Anvil
The arc:onuseanvil action type is triggered when a player uses an anvil to repair or rename an item.
🖱️ On Use Item
The arc:onuseitem action type is triggered when a player uses an item (right-clicks with an item).