Map Editing (hex)

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.

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