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.

NBT Structure

 * : The root tag.
 * : Unknown.
 * : List of Byte tags when empty, list of Compound tags otherwise.
 * : A village.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : The number of Iron Golems.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : The doors in the village.
 * : A door.
 * : Unknown.
 * : Unknown.
 * : Unknown.
 * : 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 name 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.