Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Java Edition level format

From SAS Gaming Wiki

Template:Exclusive

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:

Deprecated

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:

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:

This is the format for the Minecraft:Superflat world type:

This is the format for the Minecraft:Old Customized world type that existed before Minecraft:18w06a:

session.lock format

This file contains a single character Template:Mono encoded (E2 98 83) in UTF8.

The process goes something like this:

  1. Program opens session.lock.
  2. Program writes a single character ☃ (\u2603) to session.lock.
  3. Program tries to acquire a lock on a session.lock.
  4. 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: An integer displaying the Minecraft:data version.

History

level format History

Template:HistoryTable

level.dat History

Template:HistoryTable

weather.dat History

Template:HistoryTable

wandering_trader.dat History

Template:HistoryTable

ender_dragon_fight.dat History

Template:HistoryTable


scheduled_events.dat History

Template:HistoryTable

world_gen_settings.dat History

Template:HistoryTable

See also

Navigation

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版存档格式