summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ChunkDataSerializer.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-07-18 15:22:14 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-07-18 20:23:10 +0200
commit7425305154fb0005fde9f077cd30100c53d511a4 (patch)
tree0aeba36b1443daae94c38fe1a45075d1d31bd221 /src/Protocol/ChunkDataSerializer.h
parentMove IsValidSocket out of global namespace (diff)
downloadcuberite-7425305154fb0005fde9f077cd30100c53d511a4.tar
cuberite-7425305154fb0005fde9f077cd30100c53d511a4.tar.gz
cuberite-7425305154fb0005fde9f077cd30100c53d511a4.tar.bz2
cuberite-7425305154fb0005fde9f077cd30100c53d511a4.tar.lz
cuberite-7425305154fb0005fde9f077cd30100c53d511a4.tar.xz
cuberite-7425305154fb0005fde9f077cd30100c53d511a4.tar.zst
cuberite-7425305154fb0005fde9f077cd30100c53d511a4.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/ChunkDataSerializer.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Protocol/ChunkDataSerializer.h b/src/Protocol/ChunkDataSerializer.h
index 27a3d9426..2670a0705 100644
--- a/src/Protocol/ChunkDataSerializer.h
+++ b/src/Protocol/ChunkDataSerializer.h
@@ -13,6 +13,7 @@ other clients using the same protocol. */
class cChunkDataSerializer
{
public:
+
enum
{
RELEASE_1_8_0 = 47,
@@ -27,17 +28,13 @@ public:
const eDimension a_Dimension
);
- /** Serializes the contained chunk data into the specified protocol version.
- TEMPORARY: a_BlockTypeMap is used for the 1.13+ protocols to map from BLOCKTYPE#META to NetBlockID.
- a_BlockTypeMap is ignored for pre-1.13 protocols. */
- const AString & Serialize(int a_Version, int a_ChunkX, int a_ChunkZ, const std::map<UInt32, UInt32> & a_BlockTypeMap);
-
+ /** Serializes the contained chunk data into the specified protocol version. */
+ const AString & Serialize(int a_Version, int a_ChunkX, int a_ChunkZ);
protected:
using Serializations = std::map<int, AString>;
-
/** The data read from the chunk, to be serialized. */
const cChunkData & m_Data;
@@ -50,11 +47,10 @@ protected:
/** The per-protocol serialized data, cached for reuse for other clients. */
Serializations m_Serializations;
-
void Serialize47 (AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.8
void Serialize107(AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.9
void Serialize110(AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.9.4
- void Serialize393(AString & a_Data, int a_ChunkX, int a_ChunkZ, const std::map<UInt32, UInt32> & a_BlockTypeMap); // Release 1.13
+ void Serialize393(AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.13
} ;