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, dimensions, functions, loot tables, predicates, item modifiers, recipes, structures, tags, damage types, world generation settings, and biomes without any code modification.
Usage[]
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 is enabled for that world when the world is reloaded or loaded.
Data packs 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.
The player can also select data packs at the world creation screen by clicking the Data Packs button and dragging-and-dropping their data pack folders/zip-files there. This is similar to the resource pack selection screen, and allows the player to enable data packs before the world is generated, and easily customize the load order too.
Contents[]
Folder structure[]
- (data pack name)
- pack.mcmeta
- pack.png
- data
- (namespace)
- advancements
- (advancement).json
- functions
- (function).mcfunction
- item_modifiers
- (item_modifier).json
- loot_tables
- (loot_table).json
- predicates
- (predicate).json
- recipes
- (recipe).json
- structures
- (structure).nbt
- chat_type
- (chat type).json
- damage_type
- (damage type).json
- tags
- blocks
- (tag).json
- entity_types
- (tag).json
- fluids
- (tag).json
- functions
- (tag).json
- game_events
- (tag).json
- items
- (tag).json
- chat_type
- (tag).json
- damage_type
- (tag).json
- (registry name)
- (tag).json
- blocks
- dimension
- (dimension).json
- dimension_type
- (dimension type).json
- worldgen
- biome
- (biome).json
- configured_carver
- (carver).json
- configured_feature
- (feature).json
- density_function
- (density_function).json
- noise
- (noise).json
- noise_settings
- (noise_settings).json
- placed_feature
- (placed_feature).json
- processor_list
- (block_processor).json
- structure
- (structure).json
- structure_set
- (structure_set).json
- template_pool
- (jigsaw_pool).json
- world_preset
- (preset).json
- flat_level_generator_preset
- (flat_level_generator_preset).json
- biome
- advancements
- (namespace)
More than one directory for different namespaces may exist under the data
directory.
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.
- The root object.
- pack: Holds the data pack information.
- description: A JSON text that appears when hovering over the data pack's name in the list given by the
/datapack list
command, or when viewing the pack in the Create World screen. - pack_format: Pack version. If this number does not match the current required number, the data pack displays a warning and requires additional confirmation to load the pack. See #Pack format for a full list of pack format numbers.
- description: A JSON text that appears when hovering over the data pack's name in the list given by the
- filter: Section for filtering out files from data packs applied below this one. Any file that matches one of the patterns inside block will be treated as if it was not present in the pack at all.
- block: List of patterns
-
- namespace: A regular expression for the namespace of files to be filtered out. If unspecified, it applies to every namespace.
- path: A regular expression for the paths of files to be filtered out. If unspecified, it applies to every file.
-
- block: List of patterns
- pack: Holds the data pack information.
pack.mcmeta
, as used by the "vanilla" data pack in 1.19, as found in the client and official server jars:
{
"pack": {
"pack_format": 10,
"description": "The default data for Minecraft"
}
}
data
[]
This folder contains all the data under one or multiple namespaces. It can contain advancements
, dimension
, dimension_type
, functions
, loot_tables
, predicates
, recipes
, structures
, tags
, chat_type
, damage_type
, and/or worldgen
folders. The worldgen
folder can contain biome
, configured_carver
, configured_feature
, density_function
, flat_level_generator_preset
, noise
, noise_settings
, placed_feature
, processor_list
, structure
, structure_set
, template_pool
and world_preset
folders.
The dimension
, dimension_type
and worldgen
folders are currently experimental features.
Each advancement, function, loot table, predicate, structure, recipe and tag file can be placed directly in their respective folder but sub-folders are also allowed.
Pack format[]
The table below describes the version range using each pack format number:
Value | Versions | Releases | Breaking Changes |
---|---|---|---|
4 |
17w48a–19w46b | 1.13–1.14.4 | Added the initial pack format version of 4. |
5 |
1.15-pre1–1.16.2-pre3 | 1.15–1.16.1 | — |
6 |
1.16.2-rc1–1.16.5 | 1.16.2–1.16.5 | — |
7 |
20w46a–1.17.1 | 1.17–1.17.1 | The /replaceitem command was replaced with /item . Rolls, set_damage , and possibly other parameters in loot tables now require a valid type field when using min-max for numbers. score conditions' entity parameter was replaced with target .
|
8 |
21w37a–22w07a | 1.18–1.18.1 | Loot tables now require a type field. Removed length limits for scoreboards, score holders and team names. The lava_pool_stone_replaceables block tag was renamed to lava_pool_stone_cannot_replace .
|
9 |
1.18.2-pre1–1.18.2 | 1.18.2 | The /locate command now takes a configured structure as its first parameter rather than a structure type, so many grouped structures now require you to locate a structure type tag. E.g. /locate villager is now /locate #village .
|
10 |
22w11a–1.19.3 | 1.19–1.19.3 | Data pack can have a filter section in pack.mcmeta now. Renamed the feature field in location predicates to structure . In 22w19a, /locatebiome was merged with /locate and the syntax for /locate was changed, but the pack format was not updated.
|
11 |
23w03a–23w05a | — | only_allows_snow_and_gold_rabbits biome tag was renamed to spawns_gold_rabbits . Out-of-bound arguments in translate formats are no longer silently ignored.
|
12 |
23w06a–1.19.4 | 1.19.4 | is_projectile , is_explosion , bypasses_armor , bypasses_invulnerability , bypasses_magic , is_fire , is_magic and is_lightning fields were removed from damage type predicates in favour of a tags field which is a list of damage type tags which the damage type belongs to.
|
13 |
23w12a–23w14a | — | NBT paths for lines of text, GlowingText , and Color on the front of signs are now at front_text.messages[<index>] , front_text.has_glowing_text , and front_text.color , respectively. The relevant tags for the backs of signs are in back_text
|
14 |
23w16a–23w17a | — | item_display items have been rotated 180 degrees around Y axis to better match transformation applied when rendering items on armor stand head and in item frames.
|
15 |
23w18a–1.20.1 | 1.20–1.20.1 | All fields in placed_block , item_used_on_block , and allay_drop_item_on_block advancement triggers have been collapsed to a single location field. alternative predicate and loot table conditions were renamed to any_of .
|
16 |
23w31a | — | entity_roar and entity_shake game events have been removed and replaced with the entity_action game event. Renamed belowName value in display slot argument in scoreboard command to below_name
|
17 |
23w32a–23w35a | — | Changed mob effect storage on items, entities and block entities. Effects now use resource locations in NBT instead of numeric ids and many tag names relating to effects have been renamed to use snake_case .
|
18 |
1.20.2-pre1– | 1.20.2 | Removed /execute if function and /return run functionality (with promise to reintroduce after 1.20.2). Numerical data types are written in macros without their suffixes. Very large and very small float and double values are no longer written in standard scientific notation; they are written as their decimal expansion up to 15 decimal places, so some small values are rounded to zero.
|
48 |
1.21- | 1.21 |
Template[]
The folder structure of the vanilla data pack:
List |
---|
|
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 tick now run at the beginning of every tick. | |||||
18w01a | Added set_name function to loot tables.
| ||||
Functions tagged in 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 folder where predicates can be defined. | |||
Pre-release 1 | Changed the pack format number to 5 . | ||||
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. | |||||
Release Candidate 1 | Changed the pack format number to 6 . | ||||
1.17 | 20w45a | Pack format in version.json has been split into data and resource versions. | |||
20w46a | Changed the pack format version to 7 . | ||||
1.18 | 21w37a | Changed the pack format version to 8 . | |||
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. | |||||
Changed the pack format version to 9 , due to the changes above. | |||||
1.19 | 22w11a | Changed the pack format version to 10 . | |||
1.19.3 | 22w42a | Added a subsection called chat_type .
| |||
Added a subsection called datapacks . | |||||
The Vanilla world generation data pack is now visible within the game's jar. | |||||
1.19.4 | 23w03a | Changed the pack format version to 11 . | |||
23w06a | Added damage types. | ||||
Changed the pack format version to 12 . | |||||
1.20 | 23w12a | Changed the pack format version to 13 , accounting for sign data format changes. | |||
23w16a | Changed the pack format version to 14 . | ||||
23w18a | Changed the pack format version to 15 , accounting for predicate/loot table and advancement changes. | ||||
Upcoming Java Edition | |||||
1.20.2 | 23w31a | Changed the pack format version to 16 , accounting for sign data format changes. | |||
23w32a | The version is now 17 . | ||||
1.20.2 Pre-release 1 | The version is now 18 . |
Issues[]
Issues relating to "Data pack" are maintained on the bug tracker. Report issues there.
Gallery[]
See also[]
- Add-on
- Advancements
- Biome
- Dimension
- Function
- Item modifier
- Loot table
- Recipe
- Structure
- Tag
- Predicates
- Tutorials/Installing a data pack
- Tutorials/Creating a data pack
- Resource Pack
- Tutorials/Creating a resource pack
Components |
| ||
---|---|---|---|
Data packs | |||
Tutorials |