Java Edition Classic level format

The Classic level format refers to the order information is saved in level files from Minecraft Classic and Pre-Classic. There were three separate formats used during these versions. In all formats, they were compressed with gzip. The first format lasted from rd-132211 to Classic 0.0.12a_03 and only contained the blocks in the world. The second format lasted from Classic 0.0.13a to Classic 0.0.13a_03 and contained a short header followed by the blocks. The third format lasted from Classic 0.0.14a to Classic 0.30 and contained a short header followed by serialized Java objects with lots of different data. Single-player levels had the extension ".dat" or ".mine". Levels used by the Classic servers were named "server_level.dat".

The Classic level format can be read by the ClassicExplorer program. For the last format that used Java's Serializable interface, the easiest way to work with it was through the Classic server itself, minecraft-server.jar. Sample code was provided to show how to build an editor on top of minecraft-server.jar.

Accessing the array of bytes
The most interesting part of a level was the block array. Each byte in this array defined a block type at a corresponding location in the world. One generally had two options for accessing the byte array of blocks:

The player could deserialize the compressed .dat file directly back into an instance of a Level object inside of Java, thus having access to the instance of the Level object in exactly the same way the Minecraft Server does. This would allow the player to set the blocks, dimensions, spawn point and other aspects of the map directly by calling the methods on the instantiated Level object. Manual decompression is not needed before loading, because Java can compress and decompress gzipped files on the fly. To load the datafile back into an instance of the Level class, the player would need the class definition for the Level class. This was included with the minecraft-server.jar file. An example of this could be seen in the Development resources/Example Minecraft Classic Level Editing Class.

Others have read and modified the map's data by simply accessing the raw byte array in the datafile file. To do this, the player would decompress it, make changes to the bytes where the byte array is stored, and then compress it again. The 256x256x64 bytes (default dimensions) labeled blocks in each format were where the byte array was stored. The formula  will convert Minecraft coordinates to the byte number in the array.

Spielstand-Speicherung/Classic Level Format Format de carte Classique Classic level formaat Formato de nível da Edição Java Classic Классический формат карт Classic世界格式