Versión de datos

De Minecraft Wiki
Saltar a: navegación, buscar
Information icon.svg
Esta característica es exclusiva de Java Edition. 

A data version, also known as a world version,[1][2] is a positive integer used in world save data to denote a specific version, and determines whether the player should be warned about opening that world due to client version incompatabilities.

Usage[editar | editar código]

The game prompting the player whether they want to back up their outdated world.

Upon selecting and loading a singleplayer world, the game checks if the client has a data version newer or older than the selected world. If it does, the game then prompts the user whether they want to back up their world before playing it if the world is older, or warn them that their world may become corrupted if the world is newer.

Versioning[editar | editar código]

Every version of Java Edition since 15w32a, including minor releases and snapshots, has its own data version. The version takes the form of an ever-increasing positive integer unlike client versions. Data versions are necessary because client versions usually cannot be directly compared since they use different formats (i.e., "1.14" and "19w02a" cannot be compared). Data versions may skip numbers between any release.

Storage locations[editar | editar código]

Data versions can be found in many different places.

Player data[editar | editar código]

In-game, the data version can be obtained using the command /data get entity @s DataVersion.

options.txt[editar | editar código]

The first line of options.txt since 1.10-pre1 displays the data version, named version.

level.dat[editar | editar código]

The data version is stored in two places inside the level.dat file of a world save: in the root Data compound named DataVersion and also in the Version compound named Id.

  • level.dat
    •  Data: Information about the level.dat file.
      •  DataVersion: An integer displaying the data version.
      •  Version: Versioning information about when the world was last saved.
        •  Id: An integer displaying the data version.

Region files[editar | editar código]

Each chunk in the region files (located in .minecraft\saves\<world name>\region named r.<region X>.<region Z>.mca) contains information about the data version when it was last loaded.

  •  r.x.z.mca: Information about the region at exact region coordinates [x,y] (1 region = 32×32 chunks)
    •  Chunk [x1,y1]   in world at (x2,y2): Information about the chunk at relative chunk coordinates [x1,y1], located at exact chunk coordinates [x2,y2] (1 chunk = 16×16 blocks)
      •  DataVersion: An integer displaying the data version.

.dat and .nbt files[editar | editar código]

All .dat and .nbt files contain the data version in their root compound of when the file was last saved.

  •  file name
    •  DataVersion: An integer displaying the data version.

version.json[editar | editar código]

Each Minecraft build since 18w47b also specifies its current data version in the version.json file, found in the root directory of the client and server jars.

  • version.json
    •  world_version: The data version of this build.

List of data versions[editar | editar código]

Plantilla:Data version/Latest

History[editar | editar código]

Edición Java
1.915w32aAdded data versions, starting from version "100".

See also[editar | editar código]

References[editar | editar código]

  1. server.jar or javabridge library source, located in class
  2. As appeared in the version.json format.