1 =========================================
3 =========================================
5 Format used as of 0.4.dev-120322
6 ==================================
8 This applies to a world format carrying the serialization version 22 which
9 is used at least in version 0.4.dev-120322.
11 The serialization version used is 22. It does not fully specify every aspect
12 of this format; if compliance with this format is to be checked, it needs to
13 be done by detecting if the files and data indeed follows it.
17 Data can, in theory, be contained in the flat file directory structure
18 described below in Version 17, but it is not officially supported.
22 Everything is contained in a directory, the name of which is freeform, but
23 often serves as the name of the world.
25 Currently the authentication and ban data is stored on a per-world basis. It
26 can be copied over from an old world to a newly created world.
29 |-- auth.txt ----- Authentication data
30 |-- env_meta.txt - Environment metadata
31 |-- ipban.txt ---- Banned ips/users
32 |-- map_meta.txt - Map metadata
33 |-- map.sqlite --- Map data
34 |-- players ------ Player directory
35 | |-- player1 -- Player file
36 | '-- player2 -- Player file
37 `-- world.mt ----- World metadata
41 Contains authentication data, player per line.
42 <name>:<password hash as <name><password> SHA1 base64>:<privilege1,...>
44 Player "celeron55", no password, privileges "interact" and "shout":
45 celeron55::interact,shout
46 Player "Foo", password "bar", privileges "interact" and "shout":
47 foo:iEPX+SQWIR3p67lj/0zigSWTKHg:interact,shout
51 --- Example content ---
55 -----------------------
61 Format used as of 2011-05 or so
62 ================================
64 Map data serialization format version 17.
67 sectors/XXXXZZZZ or sectors2/XXX/ZZZ
68 XXXX, ZZZZ, XXX and ZZZ being the hexadecimal X and Z coordinates.
69 Under these, the block files are stored, called YYYY.
71 There also exists files map_meta.txt and chunk_meta, that are used by the
72 generator. If they are not found or invalid, the generator will currently
73 behave quite strangely.
75 The MapBlock file format (sectors2/XXX/ZZZ/YYYY):
76 -------------------------------------------------
78 NOTE: Byte order is MSB first.
81 - map format version number, this one is version 17
85 - 0x01: is_underground: Should be set to 0 if there will be no light
86 obstructions above the block. If/when sunlight of a block is updated and
87 there is no block above it, this value is checked for determining whether
88 sunlight comes from the top.
89 - 0x02: day_night_differs: Whether the lighting of the block is different on
90 day and night. Only blocks that have this bit set are updated when day
92 - 0x04: lighting_expired: If true, lighting is invalid and should be updated.
93 If you can't calculate lighting in your generator properly, you could try
94 setting this 1 to everything and setting the uppermost block in every
95 sector as is_underground=0. I am quite sure it doesn't work properly,
98 zlib-compressed map data:
100 u8[4096]: content types
101 u8[4096]: param1 values
102 u8[4096]: param2 values
104 zlib-compressed node metadata
107 u16 count of metadata
109 u16 position (= p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
112 u8[content_size] misc. stuff contained in the metadata
114 u16 mapblockobject_count
116 - if read != 0, just fail.
118 foreach mapblockobject_count:
119 - deprecated, should not be used. Length of this data can only be known by
120 properly parsing it. Just hope not to run into any of this.
122 u8 static object version:
125 u16 static_object_count
127 foreach static_object_count:
128 u8 type (object type-id)
136 - Timestamp when last saved, as seconds from starting the game.
137 - 0xffffffff = invalid/unknown timestamp, nothing will be done with the time
138 difference when loaded (recommended)
140 Node metadata format:
141 ---------------------
145 u8[string_len] string
153 Locking Chest metadata:
155 u8[string_len] string