Convert Minecraft server world files into MCserver world files.
#12
(10-28-2011, 02:40 AM)FakeTruth Wrote: Guess soTongue But I don't think this is completely correct:

(10-28-2011, 02:31 AM)rs2k Wrote: 01 01 01 00
This means Pak V1, Chunk V1, and 1 chunk in file.

The number of chunks is a short (2 bytes).
Like in the decimal system, numbers on the left side have more value than on the right.
If you write down 10, the value is 10 and not 1 like you sayTongue
The number of chunks in that file is ACTUALLY 1*256 + 0 = 256

256 chunks in a 3KB file? Huh

Here's a screenie of the file:
It's on the far right monitor. I was too lazy to cut the rest. lol
http://dl.dropbox.com/u/14526521/desktop.jpg


Notch's system (Taken from someone else):
=====
Region files begin with an 8kiB header containing information about which chunks are present in the region file, when they were last updated, and where they can be found. The location in the region file of a chunk at (x, z) (in chunk coordinates) can be found at byte offset 4 * ((x mod 32) + (z mod 32) * 32) in its region file. Its timestamp can be found 4096 bytes later in the file. The remainder of the file consists of data for up to 1024 chunks, interspersed with an arbitrary amount of unused space.
=====
The main difference I think I see between your file storage and notch's are his files seem to be a set size. If a chunk is smaller than max size the file is filled with empty data to make it the correct size while your chunks are stored right next to each other with the headers telling us where the chunks start and stop.
Reply
Thanks given by:


Messages In This Thread
RE: Convert Minecraft server world files into MCserver world files. - by rs2k - 10-28-2011, 02:51 AM



Users browsing this thread: 3 Guest(s)