diff options
author | Mattes D <github@xoft.cz> | 2020-01-03 17:31:13 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2020-01-07 06:53:17 +0100 |
commit | 4aef80b47eb6941d7fc41e57efe147af0ece1f9b (patch) | |
tree | 4aeb7c9e8e4aa3ae2ceed1cc60155d868852c5cd /src/Protocol/Protocol_1_13.h | |
parent | StringUtils: Added note to StringsConcat about StringJoin. (diff) | |
download | cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.gz cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.bz2 cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.lz cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.xz cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.tar.zst cuberite-4aef80b47eb6941d7fc41e57efe147af0ece1f9b.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_13.h')
-rw-r--r-- | src/Protocol/Protocol_1_13.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_13.h b/src/Protocol/Protocol_1_13.h index 6eace0567..34827501c 100644 --- a/src/Protocol/Protocol_1_13.h +++ b/src/Protocol/Protocol_1_13.h @@ -20,6 +20,13 @@ Declares the 1.13 protocol classes: +// fwd: +class BlockTypePalette; + + + + + class cProtocol_1_13 : public cProtocol_1_12_2 { @@ -28,8 +35,24 @@ class cProtocol_1_13 : public: cProtocol_1_13(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State); + virtual void Initialize(cClientHandle & a_Client) override; + + protected: + /** The palette used to transform internal block type palette into the protocol-specific ID. */ + std::shared_ptr<const BlockTypePalette> m_BlockTypePalette; + + /** Temporary hack for initial 1.13+ support while keeping BLOCKTYPE data: + Map of the BLOCKTYPE#META to the protocol-specific NetBlockID. */ + std::map<UInt32, UInt32> m_BlockTypeMap; + + + /** Returns the string identifying the palettes' version, such as "1.13" or "1.14.4". + The palettes for that version are loaded into m_BlockTypePalette and m_ItemTypePalette. */ + virtual AString GetPaletteVersion() const; + + // Outgoing packet type translation: virtual UInt32 GetPacketID(ePacketType a_PacketType) override; // Packet receiving: |