1 I'll try to quickly document the newest block format in here (might contain
2 errors). Refer to the mapgen or minetestmapper script for the directory
3 structure and file naming. There are two sector namings possible,
4 sector/XXXXZZZZ and sector/XXX/ZZZ.
6 There also exists files map_meta.txt and chunk_meta, that are used by the
7 generator. If they are not found or invalid, the generator will currently
8 behave quite strangely.
10 The MapBlock file format (sectors2/XXX/ZZZ/YYYY):
11 -------------------------------------------------
13 NOTE: Byte order is MSB first.
16 - map format version number, this one is version 17
20 - 0x01: is_underground: Should be set to 0 if there will be no light
21 obstructions above the block. If/when sunlight of a block is updated and
22 there is no block above it, this value is checked for determining whether
23 sunlight comes from the top.
24 - 0x02: day_night_differs: Whether the lighting of the block is different on
25 day and night. Only blocks that have this bit set are updated when day
27 - 0x04: lighting_expired: If true, lighting is invalid and should be updated.
28 If you can't calculate lighting in your generator properly, you could try
29 setting this 1 to everything and setting the uppermost block in every
30 sector as is_underground=0. I am quite sure it doesn't work properly,
33 zlib-compressed map data:
35 u8[4096]: content types
36 u8[4096]: param1 values
37 u8[4096]: param2 values
39 zlib-compressed node metadata
44 u16 position (= p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
47 u8[content_size] misc. stuff contained in the metadata
49 u16 mapblockobject_count
51 - if read != 0, just fail.
53 foreach mapblockobject_count:
54 - deprecated, should not be used. Length of this data can only be known by
55 properly parsing it. Just hope not to run into any of this.
57 u8 static object version:
60 u16 static_object_count
62 foreach static_object_count:
63 u8 type (object type-id)
71 - Timestamp when last saved, as seconds from starting the game.
72 - 0xffffffff = invalid/unknown timestamp, nothing will be done with the time
73 difference when loaded (recommended)
88 Locking Chest metadata: