Tag

From Minecraft Wiki
Jump to: navigation, search
Java Edition.png
This page contains content on features that may be included in the next update.
These features have appeared in development versions, but the full update containing these features has not been released yet.


Tags in data packs allow players to group items, blocks or functions together using JSON files.

Usage[edit | edit source]

To utilize block, item, or function tags the JSON files must be placed in a data pack inside the data/(namespace)/tags/blocks, data/(namespace)/tags/items or data/(namespace)/tags/functions folder respectively.

Block tags can be called when testing for block arguments in commands with #(namespace):(tag), which will succeed if the block matches any of the blocks specified in the tag. Item tags can be called when testing for item arguments in commands with #(namespace):(tag) or in recipes and advancements using "tag": "(namespace):(tag)", which will succeed if the item matches any of the items specified in the tag. Function tags can be called in the /function command with #(namespace):(tag), which will run all the functions specified in the tag in order of appearance.

The game itself also uses tags. Vanilla block tags are used for various block properties. Vanilla item tags are used for various item properties, vanilla advancement files and vanilla recipe files. There are no vanilla function tags, since there are no vanilla functions. But functions tagged in the minecraft:tick tag will run every tick at the start of the tick and functions tagged in minecraft:load will run once at the start of the tick after a (re)load.

JSON format[edit | edit source]


  • The root tag.

    •  replace: Whether or not this tag should completely replace tags from different lower priority data packs with the same namespace and name. When false the tag will append instead. Defaults to false

    •  values: A list of items, blocks or functions. Will accept other tags of the same type, but recursion is not possible.

      •  (namespace):(name): An item, block or function.

      •  #(namespace):(name): An item, block or function tag. Tags must be of the same type.

List of tags[edit | edit source]

Blocks[edit | edit source]

Tag name Values Usage
minecraft:anvil minecraft:anvil, minecraft:chipped_anvil, minecraft:damaged_anvil
  • Used to determine which blocks should open the anvil GUI. Will not work for any other blocks than the default ones, but removing any of the default blocks from the tag will stop the GUI from appearing.
  • Used to determine the damage source for entities being damaged by a falling block, which is used by the death messages.
  • Used to determine if a block has a chance to get "damaged" or break upon landing. Adding blocks to this tag that can naturally fall will not make them have a chance to break upon landing when they fall naturally. For example adding minecraft:sand will not make falling sand blocks that are created naturally have a chance to break, but falling sand blocks summoned with a command will have a chance to break.
  • Used in reading NBT from falling block entities to set the internal hurtEntities boolean to true if the entity did not have a HurtEntities NBT key.
  • Used to determine if the block should have a chance to take damage from using the anvil GUI.
minecraft:buttons #minecraft:wooden_buttons, minecraft:stone_button -
minecraft:carpets minecraft:white_carpet, minecraft:orange_carpet, minecraft:magenta_carpet, minecraft:light_blue_carpet, minecraft:yellow_carpet, minecraft:lime_carpet, minecraft:pink_carpet, minecraft:gray_carpet, minecraft:light_gray_carpet, minecraft:cyan_carpet, minecraft:purple_carpet, minecraft:blue_carpet, minecraft:brown_carpet, minecraft:green_carpet, minecraft:red_carpet, minecraft:black_carpet -
minecraft:doors #minecraft:wooden_doors, minecraft:iron_door -
minecraft:enderman_holdable minecraft:grass_block, minecraft:dirt, minecraft:coarse_dirt, minecraft:podzol, minecraft:sand, minecraft:red_sand, minecraft:gravel, minecraft:dandelion, minecraft:poppy, minecraft:blue_orchid, minecraft:allium, minecraft:azure_bluet, minecraft:red_tulip, minecraft:orange_tulip, minecraft:white_tulip, minecraft:pink_tulip, minecraft:oxeye_daisy, minecraft:brown_mushroom, minecraft:red_mushroom, minecraft:tnt, minecraft:cactus, minecraft:clay, minecraft:pumpkin, minecraft:carved_pumpkin, minecraft:melon_block, minecraft:mycelium, minecraft:netherrack
  • Used to determine what blocks enderman can pick up.
minecraft:flower_pots minecraft:flower_pot, minecraft:potted_poppy, minecraft:potted_blue_orchid, minecraft:potted_allium, minecraft:potted_azure_bluet, minecraft:potted_red_tulip, minecraft:potted_orange_tulip, minecraft:potted_white_tulip, minecraft:potted_pink_tulip, minecraft:potted_oxeye_daisy, minecraft:potted_dandelion, minecraft:potted_oak_sapling, minecraft:potted_spruce_sapling, minecraft:potted_birch_sapling, minecraft:potted_jungle_sapling, minecraft:potted_acacia_sapling, minecraft:potted_dark_oak_sapling, minecraft:potted_red_mushroom, minecraft:potted_brown_mushroom, minecraft:potted_dead_bush, minecraft:potted_fern, minecraft:potted_cactus -
minecraft:logs minecraft:oak_log, minecraft:spruce_log, minecraft:birch_log, minecraft:jungle_log, minecraft:acacia_log, minecraft:dark_oak_log, minecraft:oak_bark, minecraft:spruce_bark, minecraft:birch_bark, minecraft:jungle_bark, minecraft:acacia_bark, minecraft:dark_oak_bark
  • Used for one of the requirements for settling on a block position for the parrot wandering AI.
  • If a block in this tag is around a leaves block, the leaves block will set its check_decay block state to false.
  • Trees can grow into blocks in this tag.
  • If blocks in the default village structures match blocks inside this tag, they will be replaced by either sandstone, spruce logs or acacia logs (depending on the biome).
  • Checks progress for the punch_tree tutorial step.
minecraft:planks minecraft:oak_planks, minecraft:spruce_planks, minecraft:birch_planks, minecraft:jungle_planks, minecraft:acacia_planks, minecraft:dark_oak_planks
  • If blocks in the default village structures match blocks inside this tag, they will be replaced by either smooth sandstone, spruce planks or acacia planks (depending on the biome).
minecraft:saplings minecraft:oak_sapling, minecraft:spruce_sapling, minecraft:birch_sapling, minecraft:jungle_sapling, minecraft:acacia_sapling, minecraft:dark_oak_sapling
  • Trees can grow into blocks in this tag.
minecraft:stone_bricks minecraft:stone_bricks, minecraft:mossy_stone_bricks, minecraft:cracked_stone_bricks, minecraft:chiseled_stone_bricks -
minecraft:wooden_buttons minecraft:oak_button, minecraft:spruce_button, minecraft:birch_button, minecraft:jungle_button, minecraft:acacia_button, minecraft:dark_oak_button
  • Used in the 'buttons.json' block tag file.
minecraft:wooden_doors minecraft:oak_door, minecraft:spruce_door, minecraft:birch_door, minecraft:jungle_door, minecraft:acacia_door, minecraft:dark_oak_door
  • Used in the 'doors.json' block tag file.
minecraft:wool minecraft:white_wool, minecraft:orange_wool, minecraft:magenta_wool, minecraft:light_blue_wool, minecraft:yellow_wool, minecraft:lime_wool, minecraft:pink_wool, minecraft:gray_wool, minecraft:light_gray_wool, minecraft:cyan_wool, minecraft:purple_wool, minecraft:blue_wool, minecraft:brown_wool, minecraft:green_wool, minecraft:red_wool, minecraft:black_wool
  • Blocks in this tag can be broken quickly by shears and will also increase the usage stat of shears.
  • Placing blocks in this tag under a note block will set the instrument used to guitar.

Items[edit | edit source]

Tag name Values Usage
minecraft:buttons #minecraft:wooden_buttons, minecraft:stone_button -
minecraft:carpets minecraft:white_carpet, minecraft:orange_carpet, minecraft:magenta_carpet, minecraft:light_blue_carpet, minecraft:yellow_carpet, minecraft:lime_carpet, minecraft:pink_carpet, minecraft:gray_carpet, minecraft:light_gray_carpet, minecraft:cyan_carpet, minecraft:purple_carpet, minecraft:blue_carpet, minecraft:brown_carpet, minecraft:green_carpet, minecraft:red_carpet, minecraft:black_carpet
  • Used to check whether or not an item can go in the decoration slot of a llama, but items other than carpets will not change the llama visually.
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 67.
minecraft:doors #minecraft:wooden_doors, minecraft:iron_door -
minecraft:logs minecraft:oak_log, minecraft:spruce_log, minecraft:birch_log, minecraft:jungle_log, minecraft:acacia_log, minecraft:dark_oak_log, minecraft:oak_bark, minecraft:spruce_bark, minecraft:birch_bark, minecraft:jungle_bark, minecraft:acacia_bark, minecraft:dark_oak_bark
  • Used in various checks to either skip or progress with the "punch_tree" tutorial step.
minecraft:planks minecraft:oak_planks, minecraft:spruce_planks, minecraft:birch_planks, minecraft:jungle_planks, minecraft:acacia_planks, minecraft:dark_oak_planks
  • Used as a last check for the repair items of a tool, which is used by wooden tools.
  • Used as a check for the repair item of shields.
  • Used in various checks to either skip or progress with the "craft_planks" tutorial step.
  • Used in these 3 advancement files and these 32 recipe files.
minecraft:saplings minecraft:oak_sapling, minecraft:spruce_sapling, minecraft:birch_sapling, minecraft:jungle_sapling, minecraft:acacia_sapling, minecraft:dark_oak_sapling
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 100.
minecraft:stone_bricks minecraft:stone_bricks, minecraft:mossy_stone_bricks, minecraft:cracked_stone_bricks, minecraft:chiseled_stone_bricks
  • Used in these 3 advancement files and these 2 recipe files.
minecraft:wooden_buttons minecraft:oak_button, minecraft:spruce_button, minecraft:birch_button, minecraft:jungle_button, minecraft:acacia_button, minecraft:dark_oak_button
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 100.
  • Used in the 'buttons.json' item tag file.
minecraft:wooden_doors minecraft:oak_door, minecraft:spruce_door, minecraft:birch_door, minecraft:jungle_door, minecraft:acacia_door, minecraft:dark_oak_door
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 200.
  • Used in the 'doors.json' item tag file.
minecraft:wool minecraft:white_wool, minecraft:orange_wool, minecraft:magenta_wool, minecraft:light_blue_wool, minecraft:yellow_wool, minecraft:lime_wool, minecraft:pink_wool, minecraft:gray_wool, minecraft:light_gray_wool, minecraft:cyan_wool, minecraft:purple_wool, minecraft:blue_wool, minecraft:brown_wool, minecraft:green_wool, minecraft:red_wool, minecraft:black_wool
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 100.
  • Used in the 'painting.json' advancement file.

History[edit | edit source]

Upcoming
1.13 17w49a Added tags for blocks and items.
Added the vanilla block tags minecraft:planks and minecraft:wool.
Added the vanilla item tags minecraft:planks and minecraft:wool.
17w49b Function can now be tagged.
Functions tagged in minecraft:tick now run every tick in the beginning of the tick.
Added the vanilla block tags minecraft:buttons, minecraft:carpets, minecraft:doors, minecraft:flower_pots, minecraft:logs, minecraft:saplings and minecraft:stone_bricks.
Added the vanilla item tags minecraft:buttons, minecraft:carpets, minecraft:doors, minecraft:logs, minecraft:saplings and minecraft:stone_bricks.
17w50a Added the vanilla block tags minecraft:wooden_buttons and minecraft:wooden_doors.
Added the vanilla item tags minecraft:wooden_buttons and minecraft:wooden_doors.
Updated the vanilla block and item tags minecraft:buttons and minecraft:doors to include minecraft:stone_button and minecraft:iron_door respectively.
18w01a Functions tagged in minecraft:load will now run once after a (re)load.
Added the vanilla block tag minecraft:anvil.
18w02a Added the new block tag minecraft:enderman_holdable.

Issues[edit | edit source]

Issues relating to “Tag” are maintained on the issue tracker. Report issues there.