Data pack

From Minecraft Wiki
(Redirected from Data packs)
Jump to: navigation, search
Java Edition.png

The data pack system provides a way for players to further customize their Minecraft experience. Data packs can be used to override or add new advancements, functions, loot tables, structures, recipes and tags without any code modification.

Usage[edit]

Data packs can be placed in the .minecraft/saves/(world)/datapacks folder of a world. Each data pack is either a sub-folder or a .zip file within the datapacks folder. After it is in the folder, a data pack will be enabled for that world when the world is reloaded or loaded.

Data packs will load their data based on the load order. This order can be seen and altered by using the /datapack command and is stored in the level.dat file.

Contents[edit]

Folder structure[edit]

  • (data pack name)
    • pack.mcmeta
    • data
      • (namespace)
        • advancements
          • (advancement).json
        • functions
          • (function).mcfunction
        • loot_tables
          • (loot_table).json
        • recipes
          • (recipe).json
        • structures
          • (structure).nbt
        • tags
          • blocks
            • (tag).json
          • entity_types
            • (tag).json
          • fluids
            • (tag).json
          • functions
            • (tag).json
          • items
            • (tag).json

pack.mcmeta[edit]

A data pack is identified by Minecraft based on the presence of the pack.mcmeta file in the root directory of the data pack, which contains data in JSON format.

    •  pack: Holds the data pack information.
      •  pack_format: Pack version. Can be any number.
      •  description: A description. This string must exist but can be empty. This description will show when hovering over the data pack in the data pack list.
      •  description: Contains a raw JSON text object that will be shown instead as the pack description in the data pack list. Same behavior as the string version of the description tag, but they cannot exist together.[when?]

data[edit]

This folder contains all the data under one or multiple namespaces. It can contain advancements, functions, loot_tables, structures, recipes and/or tags folders.

Each advancement, function, loot table, structure, recipe and tag file can be placed directly in their respective folder but sub-folders are also allowed.

History[edit]

Java Edition
1.1317w43aAdded data packs.
17w46aAdded /datapack, a command to control loaded data packs.
17w48aData packs can now load custom recipes.
17w49aTags can now be created with data packs.
17w49bTags can now be created for functions.
Functions tagged in minecraft:tick now run every tick at the beginning of the tick.
18w01aAdded set_name function to loot tables.
Functions tagged in minecraft:load will now run once after a (re)load.
Crash reports now list what data packs are enabled.
1.1418w43aTags can now be created for entity types.

Issues[edit]

Issues relating to "Data pack" are maintained on the bug tracker. Report issues there.

See also[edit]