-/*
- Gets lighting value at face of node
-
- Parameters must consist of air and !air.
- Order doesn't matter.
-
- If either of the nodes doesn't exist, light is 0.
-
- parameters:
- daynight_ratio: 0...1000
- n: getNode(p) (uses only the lighting value)
- n2: getNode(p + face_dir) (uses only the lighting value)
- face_dir: axis oriented unit vector from p to p2
-
- returns encoded light value.
-*/
-u8 getFaceLight(u32 daynight_ratio, MapNode n, MapNode n2,
- v3s16 face_dir, INodeDefManager *nodemgr);
+ // Serializes or deserializes a list of nodes in bulk format (first the
+ // content of all nodes, then the param1 of all nodes, then the param2
+ // of all nodes).
+ // version = serialization version. Must be >= 22
+ // content_width = the number of bytes of content per node
+ // params_width = the number of bytes of params per node
+ // compressed = true to zlib-compress output
+ static void serializeBulk(std::ostream &os, int version,
+ const MapNode *nodes, u32 nodecount,
+ u8 content_width, u8 params_width, bool compressed);
+ static void deSerializeBulk(std::istream &is, int version,
+ MapNode *nodes, u32 nodecount,
+ u8 content_width, u8 params_width, bool compressed);
+
+private:
+ // Deprecated serialization methods
+ void deSerialize_pre22(u8 *source, u8 version);
+};