Villages.dat format

The villages.dat file located in the data folder of every Minecraft level is used to store information about the villages in the level. It is stored as a GZip'd NBT file.

Additional files villages_nether.dat and villages_end.dat are stored, allowing for villages in other dimensions should the player build them.

Villages are "forgotten" and not saved in this file when their chunks are unloaded, likely since the villagers are not loaded to continue to "see" the doors.

NBT Structure

 * : The root tag.
 * : Internal clock.
 * : List of Byte tags when empty, list of Compound tags otherwise.
 * : A village.
 * : Aggregate of the x-coordinates of all houses.
 * : Aggregate of the y-coordinates of all houses.
 * : Aggregate of the z-coordinates of all houses.
 * : X coordinate of the village center.
 * : Y coordinate of the village center.
 * : Z coordinate of the village center.
 * : The number of Iron Golems.
 * : Last time a villager was killed by a mob, or by a damage source that's not related to an entity while a player was nearby.
 * : The number of Villagers.
 * : Radius of the village.
 * : Last time a house was added to the village.
 * : Internal clock.
 * : The doors in the village.
 * : A door.
 * : Specifies the inside direction along x.
 * : Specifies the inside direction along z.
 * : Last time a villager was nearby.
 * : X coordinate.
 * : Y coordinate.
 * : Z coordinate.
 * : List of Byte tags when empty, list of Compound tags otherwise.
 * : A player who has traded or harmed villagers.
 * : The UUID of the player.
 * : The social rank of the player. Can be negative. Goes up with trading and down with harming villagers.
 * : The social rank of the player. Can be negative. Goes up with trading and down with harming villagers.

History
Villages Format Format Villages.dat Villages.dat formaat Формат Villages.dat