Minecraft:Java Edition level format
More actions
Each level is its own folder. A level folder is often identified by having a level.dat file, along with other subfolders to store the maps and regions of the level.
Directory structure
Current
This is the directory structure of the Minecraft:.minecraft/saves folder, where the game saves the entire Minecraft:world data:
- Template:File: A world directory.
- Template:File: Stores global information about the level. See below.
- Template:File: Program writes new global information about the level, and after that file is renamed to level.dat.
- Template:File: A backup of the previous level.dat file.
- Template:File: Used to give write access to the last program to modify this file. See below.
- Template:File: A data file of the player. See Minecraft:Player.dat format.
- Template:File: A data file of the player. See Statistics storage format.
- Template:File: A data file of the player. See Advancement storage format.
- Template:File: Miscellaneous data of the world.
- Template:File: Vanilla namespace for Miscellaneous data of the world.
- Template:File: Minecraft:Gamerules of the world.
- Template:File: Stores random number sequences for Minecraft:loot tables or the Template:Cmd command. See Minecraft:Random sequence format.
- Template:File: Stores Minecraft:scoreboard data, such as objectives' definition, entities' scores, teams, and display slots of objectives. See Template:Slink.
- Template:File: Stores Minecraft:Stopwatch data.
- Template:File: Stores Minecraft:Wandering Trader data.
- Template:File: Stores Minecraft:World Clock data.
- Template:File: Stores World Generation Settings data.
- Template:File: Stores Scheduled Events data.
- Template:File: Stores Boss Events data.
- Template:File: Stores Minecraft:Weather related data.
- Template:File: Vanilla namespace for Miscellaneous data of the world.
- Template:File: Stores the world's Minecraft:data packs.
- Template:FileTemplate:File: A data pack.
- Template:File: Contains region files of dimensions, added by vanilla, data packs or Minecraft:mods.
- Template:File: Namespace of the defined dimension.
- Template:File: Path of the defined dimension.
- Template:File: Miscellaneous data of the custom dimension.
- Template:File: Stores information about the ongoing raids in this dimension.
- Template:File: See above.
- Template:File: See above.
- Template:File: See above.
- Template:File: Miscellaneous data of the custom dimension.
- Template:File: Path of the defined dimension.
- Template:File: Namespace of the vanilla dimension.
- Template:File: Path of the Overworld dimension.
- Template:File: Contains data of the Overworld.
- Template:File: Namespace for the Overworld data.
- Template:File: Vanilla Namespace for the Overworld data.
- Template:File: Stores information about the ongoing Minecraft:raids in Minecraft:Overworld. See Minecraft:raids.dat format.
- Template:File: Stores information about the Minecraft:World Border.
- Template:File: Template:Cmd.
- Template:File:
- Template:File: Contains entity files for the Minecraft:Overworld. These used to be part of region.
- Template:File:
- Template:File: Villager identified beds, job sites, and bells in the Overworld. Nether portals, bee nests, bee hives, and lodestones also use this.
- Template:File:
- Template:File: A region file. See Minecraft:Anvil file format.
- Template:File: Contains data of the Overworld.
- Template:File: Path of the End dimension.
- Template:File: Path of the End dimension.
- Template:File: Path of the Overworld dimension.
- Template:File: Namespace of the defined dimension.
- Template:File: Contains resourcepacks of the world.
- Template:File: A Minecraft:resource pack applied when the world loads in.
Deprecated
- Template:File: A world directory.
- Template:File: A backup of the level.dat file before conversion from Minecraft:MCRegion to Anvil.
- Template:File: Stores the individual states of the players that have played on this level, for versions before Minecraft:1.7.6.
- Template:File: A data file of the player. See Minecraft:Player.dat format.
- Template:File: Miscellaneous data of the world.
- Template:File: Stores information about the Minecraft:villages in the world. The "nether" and "end" files have been added in 1.8. Replaced by point of interest region files in 1.14.
- Template:File: See above.
- Template:File: See above.
- Template:File: Backups of the region files before conversion from Minecraft:MCRegion to Anvil.
- Template:File: A region file. See Minecraft:Region file format.
- Template:File: See above.
- Template:File: A region file. See Minecraft:Region file format.
- Template:File: See above.
- Template:File: A region file. See Minecraft:Region file format.
- Template:File
- Template:File
- Template:File: Backups of the chunk files before conversion from the Alpha level format to Minecraft:MCRegion. See Alpha level format.
- Template:File
level.dat format
The level.dat file contains global information about the world such as the time of day, the singleplayer player, the level generator used, and the seed. When a world is loaded, the current level.dat is backed up to level.dat_old.
It is an Minecraft:NBT file with this structure:
- Template:Nbt The root tag.
- Template:Nbt: This tag contains all the level data.
- Template:Nbt: 1 or 0 (true/false) - true if cheats are enabled.
- Template:Nbt: Options for data packs.
- Template:Nbt: List of disabled data packs.
- Template:Nbt: A single data pack.
- Template:Nbt: List of enabled data packs. By default, this is populated with a single string "vanilla".
- Template:Nbt: A single data pack.
- Template:Nbt: List of disabled data packs.
- Template:Nbt: An integer displaying the Minecraft:data version.
- Template:Nbt: List of experimental features enabled for this world. Doesn't appear if there are no experimental features enabled.
- Template:Nbt: A single experimental feature.
- Template:Nbt: The default game mode for the singleplayer player when they initially spawn. 0 is Minecraft:Survival, 1 is Minecraft:Creative, 2 is Minecraft:Adventure, 3 is Minecraft:Spectator. Note: singleplayer worlds do not use this field to save which game mode the player is currently in.
- Template:Nbt: 1 or 0 (true/false) - If true, the player respawns in Minecraft:Spectator on death in singleplayer. Affects all three game modes.
- Template:Nbt: 1 or 0 (true/false) - Normally true after a world has been initialized properly after creation. If the initial simulation was canceled somehow, this can be false and the world is re-initialized on next load.
- Template:Nbt: The Unix time in milliseconds when the level was last loaded.
- Template:Nbt: The name of the level.
- Template:Nbt: The world spawn data.
- Template:Nbt: The spawn dimension, as three integers
- Template:Nbt: The pitch.
- Template:Nbt: The yaw.
- Template:Nbt: The spawn position.
- Template:Nbt: The number of ticks since the start of the level.
- Template:Nbt: File format version of level.dat. Values 19132 or 19133 represent Region and Anvil respectively.
- Template:Nbt: Information about the Minecraft version the world was saved in.
- Template:Nbt: An integer displaying the Minecraft:data version.
- Template:Nbt: The version name as a string, e.g. "15w32b".
- Template:Nbt: Developing series. In 1.18 experimental snapshots, it was set to "ccpreview". In others, set to "main".
- Template:Nbt: 1 or 0 (true/false) – Whether the version is a snapshot or not.
- Template:Nbt: 1 or 0 (true/false) - true if the world was opened in a modified version.
- Template:Nbt: This tag contains all the level data.
generatorOptions tag format
The Template:Nbt tag format varies depending on the generator name. It affects only the Minecraft:Overworld dimension. This applies to 1.15 and below.
This is the format for the Minecraft:Buffet world type:
- Template:Nbt:
- Template:Nbt:
- Template:Nbt: Ignored if the biome source ID is
minecraft:vanilla_layered.- Template:Nbt:
- Template:Nbt: A biome ID. If this or the biome source ID is omitted or invalid, the code assumes
minecraft:ocean.
- Template:Nbt: A biome ID. If this or the biome source ID is omitted or invalid, the code assumes
- Template:Nbt: The size of the biomes. Only used when the biome source ID is
minecraft:checkerboard. The biome squares have sides of 2<size>(which can be < 1) Minecraft:chunks. If no value is entered, the code assumes2.
- Template:Nbt:
- Template:Nbt: An applicable biome source ID. It determines how the biomes are distributed. Cannot be selected in-game and defaults to
minecraft:fixedfor unmodified Minecraft:worlds.
- Template:Nbt: Ignored if the biome source ID is
- Template:Nbt:
- Template:Nbt:
- Template:Nbt: A block ID, by default
minecraft:stone. - Template:Nbt: A fluid ID, by default
minecraft:water.
- Template:Nbt: A block ID, by default
- Template:Nbt: An applicable chunk generator ID. It determines the overall structure of the dimension. If this is omitted or invalid, the code assumes
minecraft:surface.
- Template:Nbt:
- Template:Nbt:
This is the format for the Minecraft:Superflat world type:
- Template:Nbt:
- Template:Nbt:
- Template:Nbt: An empty compound named as the structure, for example
decoration. If parameters are set, for examplevillage(distance=9 size=1), then the compound contains this information.- Template:Nbt: The parameter value is a number represented by a string.
- Template:Nbt: An empty compound named as the structure, for example
- Template:Nbt:
- Template:Nbt: A layer.
- Template:Nbt: The block ID.
- Template:Nbt: The height of the layer, used in worlds created before Minecraft:1.13-pre5.
- Template:Nbt: The height of the layer, used in worlds created since 1.13-pre5, if it's < 128 blocks.
- Template:Nbt: The height of the layer, used in worlds created since 1.13-pre5, if it's >= 128 blocks.
- Template:Nbt: A layer.
- Template:Nbt: The biome ID.
- Template:Nbt: The unescaped "generator-settings" string. Created only if the Minecraft:world was generated through a Minecraft:server. Until snapshot Minecraft:20w11a, it is not parsed by the game due to Template:Bug, thus the above compounds won't be created, making "generator-settings" ineffective.
- Template:Nbt:
This is the format for the Minecraft:Old Customized world type that existed before Minecraft:18w06a:
- Template:Nbt: Controls options for the world generator. Used only if the world type is Superflat or Customized. The format for Superflat is a comma separated list of block IDs from the bottom of the map up, and each block ID may optionally be preceded by the number of layers and an "*" ("x" before 1.8). Damage values are not supported.<ref>http://www.reddit.com/r/Minecraft/comments/ywjbk/superflat_customization/c5zusxl</ref> See detailed format for Superflat world type: before 1.8 and in 1.8-1.12. Refer also to Minecraft:Superflat#History that shows how the format has been changing over time. The format for Customized world type is an extremely long String which consists of name:value pairs resembling JSON (as shown in Minecraft:Old_Customized#Presets).
session.lock format
This file contains a single character Template:Mono encoded (E2 98 83) in UTF8.
The process goes something like this:
- Program opens session.lock.
- Program writes a single character ☃ (\u2603) to session.lock.
- Program tries to acquire a lock on a session.lock.
- If the lock on a session.lock fails, program aborts and gives up its lock on the level.
Minecraft can sometimes try to hold the lock on a level even after the player has started playing a different level, and this can cause strange behavior. It is recommended to ensure that Minecraft is closed before trying to acquire a lock on a level.
Before 1.16, the lock contained a Template:W 64-bit integer timestamp of when the level was last accessed since the epoch. The program, instead of writing a snowman and acquiring a lock, would monitor the file for changes, and would abort if changed.
poi format
Files in the poi folder use similar structure to region Anvil files (hence the mca extension), but the Minecraft:NBT content is different.
- Template:Nbt The root tag.
- Template:Nbt: This tag contains all the level data.
- Template:Nbt: Keys are stringified chunk section's Y coordinate (can be negative, a section at Y=2 starts at block Y=32).
- Template:Nbt:
- Template:Nbt: True (1) when created by the game, however, if the decoding of POI NBT (from the region file) data fails, and the game then save the region file again, it might save false (0). This key is internally set to true when the POI section is refreshed, and a refresh always happens when the chunk section (with terrain data) at the same coordinates is decoded. To sum up, it is very unlikely to get false.
- Template:Nbt: May be empty.
- Template:Nbt: Single record.
- Template:Nbt: 3-element array encoding X, Y and Z.
- Template:Nbt: Indicates how many "tickets" are available for villagers to claim. A value of zero indicates that this poi is not available for any villager to claim. Internally Minecraft specifies a max tickets for each poi type. This is the maximum number of villagers which can "take a ticket" (aka be using that poi type at the same time; aka max number of villagers which can claim that poi and store it in their "brain"). As of 1.17 all villager eligible poi type's have a ticket limit of one (1), with the single exception being
minecraft:meeting, (block minecraft:bell) which has a limit of 32. Poi entries which are not for villager interaction such as beehives, nether portals, lighting rods, etc., have a max ticket count of zero (0) and therefore always have a free_tickets of zero as well. - Template:Nbt: Type of the point, for example:
minecraft:home,minecraft:meeting,minecraft:butcher,minecraft:armorer, etc.
- Template:Nbt: Single record.
- Template:Nbt:
- Template:Nbt: Keys are stringified chunk section's Y coordinate (can be negative, a section at Y=2 starts at block Y=32).
- Template:Nbt: An integer displaying the Minecraft:data version.
- Template:Nbt: This tag contains all the level data.
History
level format History
level.dat History
weather.dat History
wandering_trader.dat History
ender_dragon_fight.dat History
scheduled_events.dat History
world_gen_settings.dat History
See also
Template:Navbox Java Edition technical
Minecraft:de:Weltdaten Minecraft:es:Formato de nivel de Java Edition Minecraft:fr:Format de niveau de l'édition Java Minecraft:ja:Levelフォーマット/Java Edition Minecraft:ko:Java Edition 레벨 포맷 Minecraft:lzh:爪哇版生界範式 Minecraft:nl:Level formaat Minecraft:pl:Level.dat Minecraft:pt:Formato de nível da Edição Java Minecraft:ru:Level.dat Minecraft:zh:Java版存档格式