Minecraft Wiki

The Minecraft Wiki has moved from Fandom; see the linked discussion page for details.

READ MORE

Minecraft Wiki
Advertisement

Map editing in Minecraft is still in it's early stages. Notch has mentioned the possibility of an open file format, but right now many users are working on extracting the file information and making their own levels, map editors and generators using external tools.

The server_level.dat file is where the Minecraft Server keeps the level information. As this file is primarily raw level data, it can be quite large. A regular 256x256x64 sized level is 4 megabytes in size. Therefore the datafile on disk is compressed by the server using Gzip.

The contents of the datafile is the number 656127880 as 32 bit integer (0x27 0x1B 0xB7 0x88 in hex), then the number 2 as byte (0x02 in hex), then a serialized Level java object. To deserialize one must have some way of decoding the java serialization, e.g. by using the classes from the distributed server software with a creation and saving class. This has several advances because it allows easy alteration of all map properties like the spawn location and even the dimensions.

Others have edited the map by only editing the bytes in a Gzip extracted file and then compressing again. To do this, one must keep the first 319 bytes intact and edit the next 256x256x64 bytes. It is also possible to alter the spawn location coordinates this way, by editing 3 integer values starting at byte 284 and thus overwriting the next 12 bytes (3 integers).

Blocks and Values

This is a list of all the blocks and values used.

Value [Hex] Tile Type
0 [00] empty
1 [01] rock
2 [02] grass
3 [03] dirt
4 [04] stone
5 [05] wood
6 [06] shrub
7 [07] blackrock
8 [08] water
9 [09] waterstill
10 [0A] lava
11 [0B] lavastill
12 [0C] sand
13 [0D] gravel
14 [0E] gold
15 [0F] iron
16 [10] coal
17 [11] trunk
18 [12] leaf
19 [13] sponge
20 [14] glass

Notes: Black rock is the rock lining the base of the level, it cannot be placed in-game. Non-still water and lava cause the server log to stop updating and any connecting clients freeze.

Advertisement