Data pack

A data pack is a collection of data used to configure a number of features of Minecraft. A data pack is either a folder or a .zip file containing a pack.mcmeta file. Data packs are used to define among others advancements, dimensions, enchantments, loot tables, recipes, structures, and biomes (see § Contents for a full list). The definitions of the vanilla features is done using a built-in data pack. Experiments are enabled by adding separate bundled data packs to a world. Similarly, custom data packs can be added to a world to add or modify features and define functions.
Usage
Data packs can be added to a world during world creation in the Create New World screen in the More tab by clicking the Data Packs button. This menu allows drag-and-drop of data packs from a file explorer. Alternatively, data packs can be added to an existing world by manually placing them in the .minecraft/saves/<world>/datapacks folder of a world.
When adding or modifying a data pack while the world is loaded, changes done to registry tags, loot tables, recipes, advancements, item modifiers, predicates, functions, and structure templates can be loaded using the /reload command. Other features require the world or server to be rebooted for changes to take effect (see § Experimental Settings).
Data packs load their data based on the load order. This order can be seen and altered in the Data Packs screen during world creation, and by using the /datapack command. The loading order of data packs is stored in the level.dat file. If a file exists in multiple data packs only the file in the last data pack is used. This is often referred to this file overriding the files in the earlier packs. However, tag files without "replace": true merge their content with the files loaded from earlier packs.
Experimental Settings

Some data pack features are considered experimental settings by the game. If a world has enabled a data pack that uses these features, opening the world in singleplayer will display a warning screen to the player. Additionally, worlds using experimental settings cannot be played on Realms: Attempting to upload such a world to Realms results in a server error.
Internally, most experimental settings use dynamic registries (as opposed to static registries). This means any changes regarding these features cannot be loaded using the /reload command: the world must be exited and reopened (singleplayer), or the server rebooted (multiplayer) for the changes to take effect.
For a data pack to be marked as "using experimental settings", it must contain at least one valid file inside one of several specific folders. For instance, defining a custom instrument inside the data/instrument/ folder counts as using experimental settings, whereas defining an instrument through item components does not count as such.
See § Folder structure for which folders are considered experimental settings.
Contents
Data packs use a folder structure to contain the data. On the top level, a data pack has to contain a pack.mcmeta file containing meta-data about the data pack. The data is organized into namespaces to avoid files from different packs unintentionally interfering with each other. Files are loaded as follows:
- The file
data/<namespace>/<registry name>/<path>.jsonis loaded into the<registry name>registry with ID<namespace>:<path>. Both<registry name>and<path>can contain slashes (/), which results in extra sub-folders.- Functions use the
.mcfunctionextension - Structure files use the
.nbtextension
- Functions use the
- Tags are loaded from files
data/<namespace>/tags/<registry name>/<path>.jsonwhich results in a<registry name>tag named#<namespace>:<path>.
Folder structure
If a folder is marked with an asterisk (*), it means that the game considers the feature to be experimental, and having a valid file inside any of these folders will mark the data pack as using experimental settings.
/
<data pack name>
pack.mcmeta: Metadata of the data pack. This is the only mandatory file.
pack.png: The picture to display next to the data pack in the "Data Pack Selection" screen.
data
<namespace>: Folder of the namespace to use, see Resource location § Namespaces. More than one directory for different namespaces may exist under the datadirectory. Theminecraftnamespace is used for vanilla files and can be used to override them.
function: .mcfunctionfiles with lists of commands.
structure: .nbtfiles defining a saved structure of blocks.
tags: Collections of things. Each sub-folder defines tags of a specific type using .jsonfiles.
function: Tags of functions.
<registry name>: Tags can be defined for any registry, see Tag § List of tags for tag types used.
- All following folders contain
.jsonfiles defining the content:
advancement: Definitions of advancements.
banner_pattern*: Textures and names to use for banner patterns.
cat_variant*: Textures and spawn conditions of cat variants.
chat_type*: Formatting of chat messages.
chicken_variant*: Textures and spawn conditions of chicken variants.
cow_variant*: Textures and spawn conditions of cow variants.
damage_type*: Attributes of damage and death messages.
dialog*: Definitions of dialogs.
dimension*: Biome layout and terrain of dimensions.
dimension_type*: Properties of dimensions.
enchantment*: Enchantment effects, supported items, level cost, etc.
enchantment_provider: Selection of enchantments for specific uses.
frog_variant*: Textures and spawn conditions of frog variants.
instrument*: Instruments for goat horns.
item_modifier: Loot functions used to modify items.
jukebox_song*: Jukebox song definitions.
loot_table: Loot from mobs, blocks, chests, etc.
painting_variant*: Size and texture of paintings.
pig_variant*: Textures and spawn conditions of pig variants.
predicate: Tests for specific conditions based on position, mobs, etc.
recipe: Recipes for crafting, smelting, etc.
test_environment*: A way to group up GameTests and give them the right preconditions to run.
test_instance*: A test that can be run by the GameTest framework.
trial_spawner*: Configuration of trial spawners.
trim_material*: Colors, ingredients, and name of materials for trimming
trim_pattern*: Textures and name of patterns for trimming
wolf_sound_variant*: Sound variants of wolfs.
wolf_variant*: Textures and spawn conditions of wolf variants.
worldgen*
biome: Biome generation options, effects, etc.
configured_carver: Carver cave definitions
configured_feature: Configuration of features.
density_function: Mathematical operations to calculate values for each position in the world.
noise: Size and amplitudes of a noise.
noise_settings: Terrain shape including noise caves, and main terrain block types.
placed_feature: Placement of features within a chunk.
processor_list: Post-processing of blocks in structures.
structure: Definition of structure generation and allowed biomes.
structure_set: Distribution of a set of structures within the world.
template_pool: A set of templates (structure files) for use in jigsaw structures.
world_preset: Sets of dimensions selectable in the Create World screen.
flat_level_generator_preset: Presets selectable for the "Superflat" world type.
multi_noise_biome_source_parameter_list: Name of a preset to use for the multi noise biome layout.
pack.mcmeta
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.
A pack.mcmeta file to produce a data pack that looks like the "vanilla" data pack in 1.21.7 would look this this:
{
"pack": {
"description": {
"translate": "dataPack.vanilla.description"
},
"pack_format": 81
}
}
Pack format
| Value | Releases | Significant/Breaking Changes |
|---|---|---|
| 4 | 1.13 – 1.14.4 |
|
| 5 | 1.15 – 1.16.1 |
|
| 6 | 1.16.2 – 1.16.5 |
|
| 7 | 1.17 – 1.17.1 |
|
| 8 | 1.18 – 1.18.1 |
|
| 9 | 1.18.2 | |
| 10 | 1.19 – 1.19.3 |
|
| 12 | 1.19.4 |
|
| 15 | 1.20 – 1.20.1 |
|
| 18 | 1.20.2 |
|
| 26 | 1.20.3 – 1.20.4 |
|
| 41 | 1.20.5 – 1.20.6 |
|
| 48 | 1.21 – 1.21.1 |
|
| 57 | 1.21.2 – 1.21.3 |
|
| 61 | 1.21.4 |
|
| 71 | 1.21.5 |
|
| 80 | 1.21.6 |
|
| 81 | 1.21.7 – 1.21.8 |
|
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.13 | 17w43a | Added data packs. | |||||
| 17w46a | Added /datapack, a command to control loaded data packs. | ||||||
| 17w48a | Data packs can now load custom recipes. | ||||||
Added the initial pack format version of 4. | |||||||
| 17w49a | Tags can now be created with data packs. | ||||||
| 17w49b | Tags can now be created for functions. | ||||||
Functions tagged in minecraft:tick now run at the beginning of every tick. | |||||||
| 18w01a | Functions tagged in minecraft:load now run once after a (re)load.
| ||||||
| Crash reports now list what data packs are enabled. | |||||||
| 1.14 | 18w43a | Tags can now be created for entity types. | |||||
| 1.15 | 19w38a | Added predicates. | |||||
| 1.16 | 20w22a | Slightly changed data pack loading to prevent custom data packs from crashing. | |||||
| If data pack reload fails, changes are not applied and the game continues using previous data. | |||||||
| Changes to data pack list are stored only after successful reload. | |||||||
| If existing data packs prevent the world from loading, the game gives an option to load the world in safe mode, which loads only vanilla data pack. | |||||||
Added --safeMode option for servers to load only with vanilla data pack.
| |||||||
| Game now detects any critical data pack issues, such as required tags being missing, and prevent the world from being loaded. | |||||||
| Pre-release 1 | Data packs can now be loaded before the world is created. | ||||||
| Data packs can now add and change dimensions and dimension types. | |||||||
| 1.16.2 | 20w27a | Data packs can now have a pack.png in the root folder, and display it in the data pack menu. | |||||
| 20w28a | Custom worlds now support custom biomes and can now be used in custom dimension generators. | ||||||
Data packs can now customize world generation in the worldgen folder. | |||||||
| 1.17 | 20w45a | Pack format in version.json has been split into data and resource versions. | |||||
| 20w46a | Added item modifiers. | ||||||
| 1.18.2 | Pre-release 1 | It is now possible to add custom structures in experimental data packs: the game now generates and stores data-driven configured structures. | |||||
| A lot of the cave generation is now configurable through data packs. | |||||||
| 1.19 | 22w11a | Data packs can now apply filters which block files from packs applied before the current pack. | |||||
| 1.19.3 | 22w42a | Added chat types. | |||||
Added a subsection called datapacks.
| |||||||
| The Vanilla world generation data pack is now visible within the game's jar. | |||||||
| 1.19.4 Experiment | 23w04a | Added trim_pattern and trim_material registries which is used to define armor trims. | |||||
| 1.19.4 | 23w06a | Added damage types. | |||||
| 1.20 | 23w06a | Trim patterns and trim materials definitions are no longer experimental. | |||||
| 1.20.2 | 23w31a | Data packs can now support multiple pack formats. | |||||
| Data packs can now contain overlays which are applied over the "normal" contents of a pack. | |||||||
| 1.20.5 | 24w10a | Added wolf variants which can be defined through data packs. | |||||
| Data packs can now define custom banner patterns. | |||||||
| 1.21 | 24w18a | Data packs can now define custom painting variants. | |||||
| Enchantments are now data-driven and can be defined through data packs. | |||||||
| Data packs can additionally define enchantment providers. | |||||||
| 24w19a | Renamed several directories:
| ||||||
| 24w21a | Renamed several directories:
| ||||||
| Data packs can now define custom jukebox songs. | |||||||
| 1.21.2 | 24w33a | Data packs can now define custom goat horn instruments. | |||||
| 24w35a | Trial spawner configurations can now also be defined in datapacks, instead of only in the Trial spawner block entity. | ||||||
| 1.21.5 | 25w03a | Added end-to-end GameTest system. Added test environment and test instance definitions to data packs. | |||||
| Added pig variants; including definitions in data packs. | |||||||
| 25w04a | Cat and Frog variants can now be defined in data packs. | ||||||
| 25w05a | Added cow variants; including definitions in data packs. | ||||||
| 25w06a | Added chicken variants; including definitions in data packs. | ||||||
| 25w08a | Addded wolf sound variants definition to data packs. | ||||||
| 1.21.6 | 25w15a | Added /datapack create, that can create new empty directory data packs for current world. | |||||
| 25w20a | Data packs can now define custom dialogs. | ||||||
Issues
Issues relating to "Data pack" are maintained on the bug tracker. Issues should be reported and viewed there.
Gallery
-
Example of a custom world created with a data pack.
See also
- Add-on
- Tutorial: Installing a data pack
- Tutorial: Creating a data pack
- Resource Pack
- Tutorial: Creating a resource pack
External links
- misode.github.io provides data pack generators
| Versions | |||
|---|---|---|---|
| Development |
| ||
| Technical |
See here for more information | ||
| Game customization | |||
| |||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||