Convert Minecraft server world files into MCserver world files.
#22
I'm going to save the data I've harvested into the pak format and see what happens.

I hope notch stores the blocks in the same order he sends them in. :/


Code:
Blocks are laid out in sets of vertical columns, with the rows going east-west through chunk, and columns going north-south. Blocks in each chunk are accessed via the following method:

unsigned char BlockID = Blocks[ y + z * ChunkSizeY(=128) + x * ChunkSizeY(=128) * ChunkSizeZ(=16) ];

The coordinate system is as follows:

    X increases South, decreases North
    Y increases upwards, decreases downwards
    Z increases West, decreases East



What zlib standard do you use?
Do you compress, deflate or encode?



The first four bytes in your pak files are easy to understand (first two are version numbers, next two are number of chunks), I'm not sure how to read your chunk headers.

This is what I think:
It looks like the information is written in little-endian format.

The next four bytes are supposed to be an integer representing an X coordinate.
In this header it's:
00 FF FF FF. I can't imagine that's supposed to represent 16,777,215 or 4294967040. Maybe it's a negative number? I don't know how to read or convert to a hex negative number.

The next four bytes are supposed to be an integer representing a Z (Should be Y!) coordinate.
In this header it's,
80 00 00 00. which is either 2147483648 or 128 depending on if it's big or little-endian. (I assume 128)

The next four are compressed size:
In this header:
6A 0E 00 00 (I assume this is 3690 bytes)

and uncompressed size for the last four:
In this header:
00 40 01 00 (I assume this is 81920 bytes)
Reply
Thanks given by:


Messages In This Thread
RE: Convert Minecraft server world files into MCserver world files. - by rs2k - 10-28-2011, 01:58 PM



Users browsing this thread: 3 Guest(s)