Minecraft Wiki
Advertisement

Since Beta 1.6 craftable maps were added. They are placed in the "data" directory within the world's save directory. Each map has its own file associated with its ID and one file that keeps track of the highest (= most recently created) ID. This is limited to the size of a short(65,536).[1] When Notch was adding them the first time he did not use NBT.[2]

The structure tells that there will probably be an additional feature of maps with different zoom, size and probably maps for Nether.

Data folder structure

Each map starts with map_, have one unique number and ends with .dat. The file idcounts.dat contains the latest id for current map.

map_<id>.dat Format

This file has an incremental number in it. The name for the map is in the name of the file, as the name is not in the file.

NBT Structure

The structure of the file is as follows:

  • TAG_Compound("data")
    • TAG_Byte("scale"): Probably how zoomed in the map is (if it is the zoom level, it is in 2^x blocks square per pixel, most likely). Default 3
    • TAG_Byte("dimension"): 0 = Overworld, -1 = Nether
    • TAG_Short("height"): Height of map. Default 128
    • TAG_Short("width"): Width of map. Default 128
    • TAG_Int("xCenter"): Center of map according to real world by X
    • TAG_Int("zCenter"): Center of map according to real world by Z
    • TAG_Byte_Array("colors"): Width * Height array of color values (16384 entries for a default 128x128 map) of (at the time of this writing) unknown encoding (likely a color table built into the game)

idcounts.dat Format

This file keeps track of the latest map added. As it contains NBT tags, it is not an NBT file because lack of GZIP compression.

NBT Structure

The structure of the file is as follows:

  • TAG_Short("map"): Current map id

Color table

This table should be cleaned up, or a template should be made for it.

The block IDs are sectioned in groups of 4. Darker color for water is deeper while other blocks is blending with each other.

Color Table
ID Color RGB Description
0 Transparent Not explored
1 Transparent Not explored
2 Transparent Not explored
3 Transparent Not explored
4 89,125,39 Grass
5 109,153,48 Grass
6 127,178,56 Grass
7 109,153,48 Grass
8 174,164,115 Sand/Gravel
9 213,201,140 Sand/Gravel
10 247,233,163 Sand/Gravel
11 213,201,140 Sand/Gravel
12 117,117,117 Other
13 144,144,144 Other
14 167,167,167 Other
15 144,144,144 Other
16 180,0,0 Lava
17 220,0,0 Lava
18 255,0,0 Lava
19 220,0,0 Lava
20 112,112,180 Ice
21 138,138,220 Ice
22 160,160,255 Ice
23 138,138,220 Ice
24 117,117,117 Other
25 144,144,144 Other
26 167,167,167 Other
27 144,144,144 Other
28 0,87,0 Leaves
29 0,106,0 Leaves
30 0,124,0 Leaves
31 0,106,0 Leaves
32 180,180,180 Snow
33 220,220,220 Snow
34 255,255,255 Snow
35 220,220,220 Snow
36 115,118,129 Clay
37 141,144,158 Clay
38 164,168,184 Clay
39 141,144,158 Clay
40 129, 74, 33 Dirt
41 157, 91, 40 Dirt
42 183,106, 47 Dirt
43 157, 91, 40 Dirt
44 79, 79, 79 Smoothstone/Cobblestone/Ore
45 96, 96, 96 Smoothstone/Cobblestone/Ore
46 112,112,112 Smoothstone/Cobblestone/Ore
47 96, 96, 96 Smoothstone/Cobblestone/Ore
48 45, 45,180 Water
49 55, 55,220 Water
50 64, 64,255 Water
51 55, 55,220 Water
52 73, 58, 35 Log/Tree/Wood
53 89, 71, 43 Log/Tree/Wood
54 104, 83, 50 Log/Tree/Wood
55 89, 71, 43 Log/Tree/Wood

References

Advertisement