Item Tags
Item tags are used when checking for multiple types of item and can enable vanilla functionality. For a list of vanilla item tags and their functionality, visit this page.
Applying Tags
BP/items/example_item.json
json
{
"format_version": "1.21.130",
"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, ...tags)- Returns whether the item at the specified location has all of the listed tags.
q.equipped_item_any_tag(slot, ...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');"
]
}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" }
}
]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


