Map Item Format

From Minecraft Wiki
Jump to: navigation, search
This article is an orphan, as few or no other articles link to it. Please introduce links to this page from related articles
You can help us by linking to it or categorizing it.

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 and size. There is support for Nether, but it is obscured and therefore unreadable.

Contents

[edit] 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.

[edit] 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.

[edit] NBT Structure

The structure of the file is as follows:

  • TAG_Compound("")
    • TAG_Compound("data")
      • TAG_Byte("scale"): How zoomed in the map is (it is in 2scale blocks square per pixel, even for 0, where the map will be 1:1). Default 3, minimum 0 and maximum 4.
      • TAG_Byte("dimension"): 0 = Overworld, -1 = Nether, 1 = The End
      • TAG_Short("height"): Height of map. Default (and only possible value) 128
      • TAG_Short("width"): Width of map. Default (and only possible value) 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). Color can be accessed via the following method: colorID = Colors[widthOffset + heightOffset * width], where (widthOffset==0, heightOffset==0) is left upper point.

When this structure is loaded, Colors array is transformed to standard dimension (if it's necessary) and then structure is saved with standard height and width.

[edit] idcounts.dat Format

This file keeps track of the latest map added. Despite containing NBT tags, it is not an NBT file due lack of GZIP compression.

[edit] NBT Structure

The structure of the file is as follows:

  • TAG_Short("map"): Current map id

[edit] Color table

The color 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/TNT
17 220,0,0 Lava/TNT
18 255,0,0 Lava/TNT
19 220,0,0 Lava/TNT
20 112,112,180 Ice
21 138,138,220 Ice
22 160,160,255 Ice
23 138,138,220 Ice
24 117,117,117 Metal
25 144,144,144 Metal
26 167,167,167 Metal
27 144,144,144 Metal
28 0,87,0 Plants
29 0,106,0 Plants
30 0,124,0 Plants
31 0,106,0 Plants
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 Stone/Cobblestone/Ore
45 96,96,96 Stone/Cobblestone/Ore
46 112,112,112 Stone/Cobblestone/Ore
47 96,96,96 Stone/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

[edit] Material Colors

Blocks are colored according to their Material (in the program code). Each Material has a base color which is multiplied by 180, 220 or 255 to make the map color. Some Materials share the same color; this table shows IDs for the Material Colors (multiply by 4 to get a Map Color ID).

Color Table
ID Color RGB Description
0 Transparent Glass, Powered Rail, Detector Rail, Torch, Fire, Redstone Wire, Ladders, Rails, Lever, Redstone Torch, Stone Button, Glowstone Block, Portal, Cake Block, Redstone Repeater, Glass Pane, End Portal, End Portal Frame
1 127,178,56 Grass Block, Mycelium
2 247,233,163 Sand, Gravel, Soul Sand
3 167,167,167 Sponge, Bed, Cobweb, Wool
4 255,0,0 Lava, TNT
5 160,160,255 Ice
6 167,167,167 Block of Gold, Block of Iron, Block of Diamond, Iron Door, Iron Bars, Brewing Stand, Cauldron
7 0,124,0 Saplings, Leaves, Tall Grass, Dead Bush, Dandelion, Rose, Brown Mushroom, Red Mushroom, Wheat Seeds, Cactus, Sugar Cane, Pumpkin, Jack-O-Lantern, Melon, Pumpkin Stem, Melon Stem, Vines, Lily Pad, Nether Wart, Dragon Egg
8 255,255,255 Snow, Snow Block
9 164,168,184 Clay Block, Hidden Silverfish
10 183,106,47 Dirt, Farmland
11 112,112,112 Stone, Cobblestone, Bedrock, Gold Ore, Iron Ore, Coal Ore, Lapis Lazuli Ore, Lapis Lazuli Block, Dispenser, Sandstone, Sticky Piston, Piston, Piston Extension, Block moved by Piston, Double Slabs, Slabs, Bricks, Moss Stone, Obsidian, Monster Spawner, Diamond Ore, Furnace, Cobblestone Stairs, Stone Pressure Plate, Redstone Ore, Netherrack, Stone Bricks, Brick Stairs, Stone Brick Stairs, Nether Brick, Nether Brick Fence, Nether Brick Stairs, Enchantment Table, End Stone
12 64,64,255 Water
13 104,83,50 Wooden Planks, Wood, Note Block, Bookshelf, Wooden Stairs, Chest, Crafting Table, Sign Post, Wooden Door, Wall Sign, Wooden Pressure Plate, Jukebox, Fence, Locked Chest, Trapdoor, Huge Brown Mushroom, Huge Red Mushroom, Fence Gate

[edit] References

  1. http://twitter.com/notch/status/62970142207913984
  2. http://twitter.com/notch/status/65360048049754112
Personal tools
Namespaces
Variants
Actions
Minecraft Wiki
Minecraft
Toolbox
In other languages

Recent Community Articles

Mojang Tweets

    Getting your tweets...