Block Tags

PLEASE READ

This page will be part of a rewrite to accomodate for the removal of the Holiday Creator Feature experimental toggle. Expect this page to be rewritten or removed when this happens.

Block tags can be used to ensure that a block meets certain conditions.

Applying Tags

Block tags can be applied in the same way as items - in the block's components - as seen below:

BP/blocks/tree_stump.jsonCopy
json
{
  "format_version": "1.20.60",
  "minecraft:block": {
    "description": {
      "identifier": "wiki:tree_stump",
      "menu_category": {
        "category": "nature"
      }
    },
    "components": {
      "tag:wood": {},
      "tag:my_lovely_tag": {},
      "tag:wiki:very_useless": {}
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Testing for Tags

Tags can be queried with:

  • q.all_tags
  • q.any_tag

EXPERIMENTAL

The following query functions require experimental Molang features to be enabled.

  • q.block_has_all_tags
  • q.block_has_any_tag
  • q.block_neighbor_has_all_tags
  • q.block_neighbor_has_any_tag
  • q.relative_block_has_all_tags
  • q.relative_block_has_any_tag

Example of an item querying a block's tags:

BP/items/custom_pickaxe.jsonCopy
json
{
  "format_version": "1.20.60",
  "minecraft:item": {
    "description": {
      "identifier": "wiki:custom_pickaxe",
      "menu_category": {
        "category": "equipment",
        "group": "itemGroup.name.pickaxe"
      }
    },
    "components": {
      "minecraft:digger": {
        "use_efficiency": true,
        "destroy_speeds": [
          {
            "speed": 5,
            "block": {
              "tags": "q.any_tag('custom_ore', 'stone', 'metal')"
            }
          }
        ]
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

Lists of Block Tags

Vanilla Tags

Vanilla tags can be applied to custom blocks, and some vanilla blocks are tagged internally. This kind of tag doesn't give blocks vanilla features. The only usage of it is to tag blocks to make them have the same tags as the vanilla blocks for queries or tests.

TagVanilla Usage
woodAcacia Door, Acacia Fence, Acacia Fence Gate, Acacia Planks, Acacia Pressure Plate, Acacia Sign, Barrel, Bee Nest, Beehive, Birch Door, Birch Fence, Birch Fence Gate, Birch Log, Birch Planks, Birch Pressure Plate, Birch Sign, Birch Slab, Birch Stairs, Dark Oak Door, Dark Oak Fence, Dark Oak Fence Gate, Dark Oak Log, Dark Oak Planks, Dark Oak Pressure Plate, Dark Oak Sign, Dark Oak Slab, Dark Oak Stairs, Fletching Table, Jungle Door, Jungle Fence, Jungle Fence Gate, Jungle Log, Jungle Planks, Jungle Pressure Plate, Jungle Sign, Jungle Slab, Jungle Stairs, Ladder, Oak Door, Oak Fence, Oak Fence Gate, Oak Log, Oak Planks, Oak Pressure Plate, Oak Sign, Oak Slab, Oak Stairs, Oak Trapdoor, Smithing Table, Spruce Door, Spruce Fence, Spruce Fence Gate, Spruce Log, Spruce Planks, Spruce Pressure Plate, Spruce Sign, Spruce Slab, Spruce Stairs, Spruce Trapdoor
pumpkinCarved Pumpkin, Jack o'Lantern, Pumpkin
plantAcacia Sapling, Birch Sapling, Dark Oak Sapling, Jungle Sapling, Large Fern, Lilac, Oak Sapling, Oak Sapling, Peony, Rose Bush, Spruce Sapling, Sunflower, Tall Grass
stoneAndesite, Andesite Wall, Brick Slab, Brick Wall, Bricks, Cobblestone, Cobblestone Slab, Cobblestone Stairs, Cobblestone Wall, Diorite, Diorite Wall, Dripstone Block, End Stone Brick Wall, Granite, Granite Wall, Mossy Cobblestone, Mossy Cobblestone Wall, Nether Brick Wall, Polished Andesite, Polished Diorite, Polished Granite, Prismarine Wall, Quartz Slab, Red Nether Brick Wall, Red Sandstone Wall, Sandstone Slab, Sandstone Wall, Smooth Stone Slab, Stone, Stone Brick Wall, Stone Bricks Slab
metalBlock of Gold, Block of Iron, Cauldron, Iron Bars
diamond_pick_diggableBlock of Raw Gold, Block of Raw Iron, Coal Ore, Deepslate Coal Ore, Deepslate Diamond Ore, Deepslate Emerald Ore, Deepslate Gold Ore, Deepslate Iron Ore, Deepslate Redstone Ore, Diamond Ore, Emerald Ore, Gold Ore, Iron Ore, Lapis Lazuli Ore, Obsidian, Redstone Ore
gold_pick_diggable
iron_pick_diggableBlock of Raw Gold, Block of Raw Iron, Coal Ore, Deepslate Coal Ore, Deepslate Diamond Ore, Deepslate Emerald Ore, Deepslate Gold Ore, Deepslate Iron Ore, Deepslate Redstone Ore, Diamond Ore, Emerald Ore, Gold Ore, Iron Ore, Lapis Lazuli Ore, Redstone Ore
stone_pick_diggable
wood_pick_diggable
dirtFarmland
sandRed Sand, Sand
gravelGravel
grassCoarse Dirt, Dirt, Dirt Path, Grass Block
snowSnow
railActivator Rail, Detector Rail, Powered Rail, Rail
waterWater
mob_spawnerSpawner
lush_plants_replaceable
azalea_log_replaceable
not_feature_replaceablebedrock, chest, end portal frame, mob spawner
text_signAll kinds of signs
minecraft:cropBeetroot, Carrot, Potato, Wheat
fertilize_areaAll types of Flowers, except Tall Flowers & Wither Rose; Crimson Nylium, Warped Nylium, Grass, Moss

Vanilla Block Tags

Vanilla block tags are tags built specifically for blocks. They can give some vanilla features to the blocks which are tagged with them.

TagVanilla UsageDescription
acaciaAcacia Log
birchBirch Log
dark_oakDark Oak Log
jungleJungle Log
logOak Log, Spruce Log, Birch Log, Jungle Log, Acacia Log, Dark Oak LogA log block.
oakOak Log
spruceSpruce Log

Contributors

SirLichKaioga5