Tag Generator
BetaPick what the tag groups (blocks, items, mobs, functions, biomes…), add IDs or other #tags, and the preview shows every member. You get the tag JSON in the right folder for your Java version and a command that uses it.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
- Hay Block
- Slime Block
- Sponge
- #wool
- White Wool
- Orange Wool
- Magenta Wool
- Light Blue Wool
- Yellow Wool
- Lime Wool
- Pink Wool
- Gray Wool
- Light Gray Wool
- Cyan Wool
- Purple Wool
- Blue Wool
- Brown Wool
- Green Wool
- Red Wool
- Black Wool
- Honey Blockoptional
20 IDs · file: tags/block/soft_blocks.json
Your command · Java 26.3
177 characters/execute as @p at @s if block ~ ~-1 ~ #my_pack:soft_blocks run say I am standing on a block from the tag/fill ~-3 ~-1 ~-3 ~3 ~-1 ~3 minecraft:glass replace #my_pack:soft_blocks
data/my_pack/tags/block/soft_blocks.json{
"values": [
"minecraft:hay_block",
"minecraft:slime_block",
"minecraft:sponge",
"#minecraft:wool",
{
"id": "minecraft:honey_block",
"required": false
}
]
}
- Put the file in your data pack (or press Download data pack), drop the pack in your world's datapacks folder, then run /reload.
Raw editor
How it works
A tag is a named list of IDs. Commands, recipes, loot tables and predicates can use #my_pack:soft_blocks wherever they take one ID, and the game checks every member. A tag can include other tags.
{
"values": [
"minecraft:hay_block",
"#minecraft:wool",
{"id": "minecraft:honey_block", "required": false}
]
}Folders by version
Up to Java 1.20.6 the folders are plural: tags/blocks, tags/items, tags/entity_types, tags/functions, tags/fluids, tags/game_events. From 1.21 they are singular: tags/block, tags/item, tags/entity_type, tags/function. Biome tags (tags/worldgen/biome, 1.18.2+), structure tags (1.19+), damage type tags (1.19.4+) and enchantment tags (1.21+) kept their names.
Optional entries and replace
From 1.16.2 an entry can be {"id": "...", "required": false}: the tag still loads when that ID doesn’t exist, which is useful for IDs from other mods or newer versions. In older versions one missing ID stops the whole tag from loading. "replace": true throws away what other packs put in the tag; leave it off to add to it.
Using the tag
Block tags: execute if block ~ ~-1 ~ #my_pack:soft_blocks. Item tags: clear @p #my_pack:weapons 0 counts matching items, and from 1.20.5 execute if items entity @s weapon.mainhand #my_pack:weapons. Mob tags: @e[type=#my_pack:undead]. Function tags: function #my_pack:start; #minecraft:tick runs every tick and #minecraft:load after each reload. Biome tags work with locate biome (1.19+) and execute if biome (1.19.3+). Tags are a Java data-pack feature.
FAQ
How do I make a function run every tick?
Make a Functions tag named tick in the minecraft namespace (#minecraft:tick) and add your function, e.g. my_pack:main. Use #minecraft:load for a function that should run once after /reload.
How do I add blocks to a vanilla tag?
Set the namespace to minecraft and the name to the vanilla tag, for example minecraft:logs, and leave Replace off. Your values are added to the vanilla ones.
Why does my tag not load?
Check the folder for your version (tags/blocks before 1.21, tags/block from 1.21) and look for an ID that doesn't exist in your version. Mark such IDs Optional (1.16.2+) so the rest of the tag still loads.
Can a tag contain another tag?
Yes: add #namespace:name as a value. The game includes all of that tag's members. A tag can't include itself, directly or through another tag.
Does Bedrock have tags like this?
No. Bedrock uses tags inside its own block and item definitions, but there are no data-pack tag files and commands can't use #tags the same way.