From 7425305154fb0005fde9f077cd30100c53d511a4 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 18 Jul 2020 14:22:14 +0100 Subject: 1.13 items support + Add 1.16 block and item definitions --- src/Protocol/ChunkDataSerializer.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/Protocol/ChunkDataSerializer.h') 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 & 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; - /** 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 & a_BlockTypeMap); // Release 1.13 + void Serialize393(AString & a_Data, int a_ChunkX, int a_ChunkZ); // Release 1.13 } ; -- cgit v1.2.3