Skip to content

Datapack tag

Datapack registry tagDatapack registry tags

Tags let you define custom element groups for other functionalities like Advancements or Recipes.

  1. Create a folder named tags in your Datapack namespace

    • Directory<datapack>
      • pack.mcmeta
      • pack.png
      • Directorydata
        • Directoryminecraft
        • Directory<namespace>
          • Directorytags
  2. Tags can affect completely different areas of Minecraft, so to keep things organized and isolated, you’ll need to create a subfolder for the context you want your tag to be aviable in

    | Folder | Context | | ----------------------------- | ----------------------------------- | | banner_pattern | Banner patterns | | biome | Biome specific spawnable structures | | block | Advancements and world generation | | damage_type | Damage types | | dialog | Dialogs | | enchantment | Enchantment book drops | | entity_type | Target selectors | | flat_level_generator_preset | Flat level generator presets | | fluid | Fluids | | function | Functions | | game_event | Game events | | instrument | Instrument | | item | Recipes and filtering | | painting_variant | Painting variants | | point_of_interest | Point of interests | | structure | Structures | | world_presets | World presents |

  3. Create a <tag>.json file for your tag and list the element Identifiers

    oak.json
    {
    "values": [
    // element identifiers
    "minecraft:oak_log",
    "minecraft:oak_planks"
    ]
    }
  4. Done