Data version

A data version, also known as a world version, 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
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
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
Data versions can be found in many different places.

Player data
In-game, the data version can be obtained using the command.

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

level.dat
The data version is stored in two places inside the level.dat file of a world save: in the root compound named  and also in the  compound named.
 * level.dat
 * : Information about the level.dat file.
 * : An integer displaying the data version.
 * : Versioning information about when the world was last saved.
 * : An integer displaying the data version.

Region files
Each chunk in the region files (located in .minecraft\saves\\region named r...mca ) contains information about the data version when it was last saved.


 * : Information about the region at exact region coordinates [x,y] (1 region = 32&times;32 chunks)
 * : Information about the chunk at relative chunk coordinates [x1,y1], located at exact chunk coordinates [x2,y2] (1 chunk = 16&times;16 blocks)
 * : An integer displaying the data version.

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


 * : An integer displaying the data version.
 * : An integer displaying the data version.

version.json
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
 * : The data version of this build.