diff options
author | est31 <MTest31@outlook.com> | 2015-09-18 15:02:02 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-09-18 16:47:13 +0200 |
commit | 691eb2d06d646ff96af9aaed0bfe823f64f0acda (patch) | |
tree | b7ed787af8cbd1556a73db9254de1a936f0e652d /doc | |
parent | 94f1e5d9bdd30725a7a63b668450dc0646a873cd (diff) | |
download | minetest-691eb2d06d646ff96af9aaed0bfe823f64f0acda.tar.gz minetest-691eb2d06d646ff96af9aaed0bfe823f64f0acda.tar.bz2 minetest-691eb2d06d646ff96af9aaed0bfe823f64f0acda.zip |
Document current node metadata format
Document the node metadata changes of the commit (serialisation version >=23):
704782c95b8a4194a9383da55d93f37fd0f7278f "WIP node metadata, node timers"
Diffstat (limited to 'doc')
-rw-r--r-- | doc/world_format.txt | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/world_format.txt b/doc/world_format.txt index 105fbb63e..9255fa8c0 100644 --- a/doc/world_format.txt +++ b/doc/world_format.txt @@ -250,7 +250,7 @@ NOTE: Zlib data is in such a format that Python's zlib at least can directly decompress. u8 version -- map format version number, this one is version 22 +- map format version number, see serialisation.h for the latest number u8 flags - Flag bitmasks: @@ -296,13 +296,26 @@ if content_width == 2: zlib-compressed node metadata list - content: +if map format version <= 22: u16 version (=1) u16 count of metadata foreach count: u16 position (p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X) u16 type_id u16 content_size - u8[content_size] (content of metadata) + u8[content_size] content of metadata. Format depends on type_id, see below. +if map format version >= 23: + u8 version (=1) -- Note the type is u8, while for map format version <= 22 it's u16 + u16 count of metadata + foreach count: + u16 position (p.Z*MAP_BLOCKSIZE*MAP_BLOCKSIZE + p.Y*MAP_BLOCKSIZE + p.X) + u32 num_vars + foreach num_vars: + u16 key_len + u8[name_len] key + u32 val_len + u8[val_len] value + serialized inventory - Node timers if map format version == 23: @@ -378,8 +391,9 @@ The name-id-mapping -------------------- The mapping maps node content ids to node names. -Node metadata format ---------------------- +Node metadata format for map format versions <= 22 +--------------------------------------------------- +The node metadata are serialized depending on the type_id field. 1: Generic metadata serialized inventory |