Has anyone figured out how infdev maps are put together? I wanted to try making an overworld map of the places I've been, but the format makes no sense.
The tiered folders with occasionally multiple files in one folder strikes me as being a hash map, but I haven't figured out how the key relates to x-y coordinates or how data is arranged inside the chunk data. Anyone else have any luck with it?
I may have figured it out.
It looks like the the filename of each chunk is their x and z coordinate. I guess Notch uses y to express the vertical or something. The first number is the x coordinate in base 36, and the second number is the Z. The coordinate undergoes modulus division by 64(1S), so you won't see any folders larger than that.
The data in the chunk looks like this
Level: 2 bytes (level 1-5)
Data: 16*16*128/2 bytes
Last Update: 8 bytes (mystery)
Xpos: 4 bytes
Zpos: 4 bytes
TileEntities: 8 bytes (mystery)
Skylight: 16*16*128/2 bytes
HeightMap: 16*16 bytes
BlockLight: 16*16*128/2 bytes
Blocks: 16*16*128 bytes
Skylight looks like it is written as 256 blocks of 64 bytes apiece, with the front end having values of 0x0 and the latter end having 0xF. Each block is probably one stack out of the 16x16 stacks in the chunk listed in ascending order by elevation. Light takes up 4 bits of every byte, so there are 128 z-levels.
One interesting thing about this level layout is that the height of a chunk is locked at 128 z-levels because of how it is packed. However, it is possible to extend the chunk depth to 256 z-levels, or the depth of a huge/deep map, with the current engine. What I would really like to see is a map system that will dynamically change between 128 and 256 z-levels when a player gets close enough to the top or bottom, or at least make it a server setting. If it is empty space, it will compress nearly the same.
So, there you have it. If anyone knows what the mystery values do, or really any of the values in level.dat, let me know. Also haven't found the player/container inventories.
Notch said the player coordinates were a 64-bit float where you start at 0,0 and always stay relative to the origin. Chunk coordinates are those coordinates but /16.
The only reason every map looks different is because the random seed in level.dat is different.
Is there any way to manipulate this seed to get other peoples map shape. I know the seed changes every infdev update as well (Creating them chunk glitches).
Do the seeds exist for standard, non infinite maps. If they do it is possible to decide what seed you get during map generation?
A seed is just a reset of the random function to make it change the random pattern basically.
As far as I know?
Normally, the seed is changed every time a random number is pulled from the generator so that it will produce a different number the next time. In minecraft, I believe the seed for each chunk generation is based on the combination of the level seed and the chunk position, meaning you can explore and generate chunks in any order.