Item Tags
Item tags can be used to ensure that an item meets certain conditions.
Applying Tags
BP/items/example_item.json
json
{
"format_version": "1.21.120",
"minecraft:item": {
"description": {
"identifier": "wiki:example_item"
},
"components": {
"minecraft:tags": {
"tags": ["wiki:example_tag"]
}
}
}
}Testing for Tags
From Entities
q.equipped_item_all_tags(slot, index?, ...tags)- Returns whether the item at the specified location has all of the listed tags.
q.equipped_item_any_tag(slot, index?, ...tags)- Returns whether the item at the specified location has at least one of the listed tags.
minecraft:client_entity > description
json
"scripts": {
"pre_animation": [
"v.is_holding_pickaxe = q.equipped_item_all_tags('slot.weapon.mainhand', 'minecraft:is_tool', 'minecraft:is_pickaxe');",
"v.last_slot_has_food = q.equipped_item_any_tag('slot.hotbar', 8, 'minecraft:is_food');"
]
}From Item Descriptors
q.all_tags(...tags)- Returns whether the item has all of the listed tags.
q.any_tag(...tags)- Returns whether the item has at least one of the listed tags.
Item Descriptor
json
{
"tags": "q.all_tags('minecraft:is_tool', 'minecraft:is_pickaxe') && q.any_tag('minecraft:diamond_tier', 'minecraft:netherite_tier')"
}From Recipes
minecraft:recipe_shapeless
json
"ingredients": [
{
"item": { "tag": "minecraft:planks" }
}
]List of Vanilla Tags
Tag | Vanilla Usage | Functionality |
|---|---|---|
minecraft:arrow |
| |
minecraft:banner |
| |
minecraft:boat |
| |
minecraft:boats |
| |
minecraft:bookshelf_books |
| Items that can be stored in a Chiseled Bookshelf. |
minecraft:chainmail_tier |
| |
minecraft:coals |
| |
minecraft:copper_tier |
| |
minecraft:crimson_stems |
| |
minecraft:decorated_pot_sherds |
|
|
minecraft:diamond_tier |
| |
minecraft:digger |
| |
minecraft:door |
| |
minecraft:egg |
| |
minecraft:golden_tier |
| |
minecraft:hanging_actor |
| |
minecraft:hanging_sign |
| |
minecraft:harness |
| |
minecraft:horse_armor |
| |
minecraft:iron_tier |
| |
minecraft:is_armor |
| |
minecraft:is_axe |
| Allows the item to be used to strip logs. |
minecraft:is_cooked |
| |
minecraft:is_fish |
| |
minecraft:is_food |
| Allows the item to be picked up by foxes. |
minecraft:is_hoe |
| |
minecraft:is_meat |
| |
minecraft:is_minecart |
| |
minecraft:is_pickaxe |
| |
minecraft:is_shears |
| |
minecraft:is_shovel |
| Allows the item to be used to create dirt paths, extinguish campfires and turn layers of snow into snowballs. |
minecraft:is_spear |
| |
minecraft:is_sword |
| |
minecraft:is_tool |
| |
minecraft:is_trident |
| |
minecraft:leather_tier |
| |
minecraft:lectern_books |
| |
minecraft:logs |
| Items that can be used as logs when crafting blocks such as campfires and the Smoker. |
minecraft:logs_that_burn |
| Items that can be smelted in a furnace to create Charcoal. |
minecraft:mangrove_logs |
| |
minecraft:music_disc |
| |
minecraft:nautilus_armor |
| |
minecraft:netherite_tier |
| |
minecraft:planks |
| Allows the item to be used as planks in crafting recipes. |
minecraft:sand |
| |
minecraft:sign |
| |
minecraft:soul_fire_base_blocks |
| Items that can be used like soul sand/soil when crafting blocks such as the Soul Campfire and Soul Torch. |
minecraft:spawn_egg |
| |
minecraft:stone_bricks |
| |
minecraft:stone_crafting_materials |
| Items that can be used like cobblestone when crafting blocks such as the Furnace and Brewing Stand. |
minecraft:stone_tier |
| |
minecraft:stone_tool_materials |
| Items that can be used like cobblestone to craft stone tools. |
minecraft:transform_materials |
| |
minecraft:transform_templates |
| |
minecraft:transformable_items |
| |
minecraft:trim_materials |
| |
minecraft:trim_templates |
| |
minecraft:trimmable_armors |
| Items that can be trimmed in a Smithing Table. |
minecraft:vibration_damper |
| Prevents the item from emitting vibrations when dropped onto the ground. |
minecraft:warped_stems |
| |
minecraft:wooden_slabs |
| |
minecraft:wooden_tier |
| |
minecraft:wool |
| Allows the item to be used as wool in crafting recipes. |
Contributors
Edit Item Tags on GitHubText and image content on this page is licensed under the Creative Commons Attribution 4.0 International License
Code samples on this page are licensed under the MIT License


