Skip to main content

Item

The arc:item condition type checks if an item matches a specific item, including optional checks for count and components.

Parameters

ParameterTypeRequiredDefaultDescription
itemItemRequired-The item to check.
check_componentsbooleanOptionaltrueWhether to check item components.

Example

The following example gives the player a speed boost when they drink a Potion of Swiftness.

data/my_datapack/arc/boost_swiftness_potion.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:swiftness"
}
}
}
}
],
"rewards": [
{
"type": "arc:effect_amplifier_addition",
"addition": 1
}
]
}

Compatible Action Types