Editing
Java Edition Classic level format
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Accessing the array of bytes== The most interesting part of a level was the block array. Each byte in this array defined a [[Java Edition data values/Classic|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 <samp>minecraft-server.jar</samp> 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 <code>65536 * y + 256 * z + x = Byte #</code> will convert Minecraft coordinates to the byte number in the array. {{Java Edition}} [[Category:Server]] [[de:Spielstand-Speicherung/Classic Level Format]] [[fr:Format de carte Classique]] [[nl:Classic level formaat]] [[pt:Formato de nível da Edição Java Classic]] [[ru:Классический формат карт]] [[zh:Classic世界格式]]
Summary:
Please note that all contributions to Kiiw may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Kiiw:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information