1
0

1.13 items support

+ Add 1.16 block and item definitions
This commit is contained in:
Tiger Wang
2020-07-18 14:22:14 +01:00
parent 951a0212d8
commit 7425305154
23 changed files with 67621 additions and 90 deletions

View File

@@ -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
} ;