File tree 1 file changed +18
-4
lines changed
1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ NOTE: Zlib data is in such a format that Python's zlib at least can
250
250
directly decompress.
251
251
252
252
u8 version
253
- - map format version number, this one is version 22
253
+ - map format version number, see serialisation.h for the latest number
254
254
255
255
u8 flags
256
256
- Flag bitmasks:
@@ -296,13 +296,26 @@ if content_width == 2:
296
296
297
297
zlib-compressed node metadata list
298
298
- content:
299
+ if map format version <= 22:
299
300
u16 version (=1)
300
301
u16 count of metadata
301
302
foreach count:
302
303
u16 position (p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
303
304
u16 type_id
304
305
u16 content_size
305
- u8[content_size] (content of metadata)
306
+ u8[content_size] content of metadata. Format depends on type_id, see below.
307
+ if map format version >= 23:
308
+ u8 version (=1) -- Note the type is u8, while for map format version <= 22 it's u16
309
+ u16 count of metadata
310
+ foreach count:
311
+ u16 position (p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X)
312
+ u32 num_vars
313
+ foreach num_vars:
314
+ u16 key_len
315
+ u8[name_len] key
316
+ u32 val_len
317
+ u8[val_len] value
318
+ serialized inventory
306
319
307
320
- Node timers
308
321
if map format version == 23:
@@ -378,8 +391,9 @@ The name-id-mapping
378
391
--------------------
379
392
The mapping maps node content ids to node names.
380
393
381
- Node metadata format
382
- ---------------------
394
+ Node metadata format for map format versions <= 22
395
+ ---------------------------------------------------
396
+ The node metadata are serialized depending on the type_id field.
383
397
384
398
1: Generic metadata
385
399
serialized inventory
You can’t perform that action at this time.
0 commit comments