diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-19 01:41:29 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-19 01:43:33 +0200 |
commit | c99ddbc376523bbf9b67c5e5c786f13a4363a533 (patch) | |
tree | 13bc3a83ec40eb33a2f031bfccbb8b1cf1a42655 /src/Protocol/Protocol_1_13.h | |
parent | Add 1.13.1 to 1.15.2 mappings (diff) | |
download | cuberite-c99ddbc376523bbf9b67c5e5c786f13a4363a533.tar cuberite-c99ddbc376523bbf9b67c5e5c786f13a4363a533.tar.gz cuberite-c99ddbc376523bbf9b67c5e5c786f13a4363a533.tar.bz2 cuberite-c99ddbc376523bbf9b67c5e5c786f13a4363a533.tar.lz cuberite-c99ddbc376523bbf9b67c5e5c786f13a4363a533.tar.xz cuberite-c99ddbc376523bbf9b67c5e5c786f13a4363a533.tar.zst cuberite-c99ddbc376523bbf9b67c5e5c786f13a4363a533.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol_1_13.h | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/src/Protocol/Protocol_1_13.h b/src/Protocol/Protocol_1_13.h index b315768ba..62f9cf2e4 100644 --- a/src/Protocol/Protocol_1_13.h +++ b/src/Protocol/Protocol_1_13.h @@ -35,7 +35,7 @@ class cProtocol_1_13: public: - cProtocol_1_13(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State); + using Super::cProtocol_1_12_2; protected: @@ -67,6 +67,8 @@ protected: virtual UInt8 GetEntityMetadataID(eEntityMetadata a_Metadata); virtual UInt8 GetEntityMetadataID(eEntityMetadataType a_FieldType); + virtual std::pair<short, short> GetItemFromProtocolID(UInt32 a_ProtocolID); + virtual UInt32 GetProtocolIDFromItem(short a_ItemID, short a_ItemDamage); virtual bool ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes) override; virtual void WriteItem(cPacketizer & a_Pkt, const cItem & a_Item) override; @@ -74,3 +76,45 @@ protected: virtual void WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity) override; virtual void WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) override; }; + + + + + +class cProtocol_1_13_1 : + public cProtocol_1_13 +{ + using Super = cProtocol_1_13; + +public: + + using Super::cProtocol_1_13; + +protected: + + /** Returns 1.13.1 */ + virtual Version GetProtocolVersion() override; + virtual std::pair<short, short> GetItemFromProtocolID(UInt32 a_ProtocolID) override; + virtual UInt32 GetProtocolIDFromItem(short a_ItemID, short a_ItemDamage) override; +}; + + + + + +class cProtocol_1_13_2 : + public cProtocol_1_13_1 +{ + using Super = cProtocol_1_13_1; + +public: + + using Super::Super; + +protected: + + /** Returns 1.13.2 */ + virtual Version GetProtocolVersion() override; + virtual bool ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes) override; + virtual void WriteItem(cPacketizer & a_Pkt, const cItem & a_Item) override; +}; |