by bcmpinc » Sat Feb 04, 2012 14:12
This is what I remember from minetest 0.3:
The world is stored as cubes of 16x16x16 blocks. So if you want to know whats block is at 36 blocks from the origin in x-direction, you need to get the blob field of the row that has coordinate (2,0,0). Because (36 div 16) = 2. The blob is zipped, so you need to unpack it. You can look in the minetestmapper code to see how this is done. Then you need to extract the data, which will give you one 3d array and one set of metadata. In the 3d array you read the value at position [2+0*16+0*256]. This value contains information about what type this block is. Unfortunately, this also uses a non-trivial encoding, but again, minetestmapper.py should help here.