Skip to main content

Item In Inventory

The arc:item_in_inventory condition type checks if the player has a specific item anywhere in their main inventory.

Parameters​

ParameterTypeRequiredDefaultDescription
itemItemβœ…Required-The item to check.

Example​

The following example gives the player a diamond if they craft something while having a crafting table in their inventory.

data/my_datapack/arc/crafting_bench_bonus.json
{
"holder": {
"type": "arc:player",
"id": "arc:player"
},
"type": "arc:on_craft_item",
"conditions": [
{
"type": "arc:item_in_inventory",
"item": { "id": "minecraft:crafting_table" }
}
],
"rewards": [
{
"type": "arc:item",
"item": { "id": "minecraft:diamond" }
}
]
}

Compatible Action Types​