Page 1 of 1

Minecraft overviewer

PostPosted: Fri Feb 03, 2012 10:56
by neko259
Can anybody port it to work with minetest maps? It would be really helpful.

PostPosted: Fri Feb 03, 2012 11:28
by dannydark
This indeed would be a nice addition to Minetest ^_^

PostPosted: Fri Feb 03, 2012 11:33
by neko259
dannydark wrote:This indeed would be a nice addition to Minetest ^_^

I wanted to edit minetest map generator to make it generate blocks view, not only a color. But I can't understand how does it get nodes data from the map database. And the database itself is very strange. Instead of having different columns for different characteristics it stored some encoded coordinate and a blob field with everything else.

PostPosted: Sat Feb 04, 2012 14:12
by bcmpinc
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.