diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-04-10 16:57:16 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-04-12 23:35:07 +0200 |
commit | a999c5d845bd759c6d83b356c7b39e67473dc452 (patch) | |
tree | c8da72f5192293648f30b3228e7563fa7c79d13e /src/Protocol/Protocol_1_12.h | |
parent | Add animations for shield/item block & break (diff) | |
download | cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.gz cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.bz2 cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.lz cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.xz cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.tar.zst cuberite-a999c5d845bd759c6d83b356c7b39e67473dc452.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_12.h')
-rw-r--r-- | src/Protocol/Protocol_1_12.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/Protocol/Protocol_1_12.h b/src/Protocol/Protocol_1_12.h index 65bc23bcd..0d18c2ae5 100644 --- a/src/Protocol/Protocol_1_12.h +++ b/src/Protocol/Protocol_1_12.h @@ -34,16 +34,18 @@ public: protected: - virtual UInt32 GetPacketID(ePacketType a_Packet) override; - virtual Version GetProtocolVersion() override; + virtual UInt32 GetPacketID(ePacketType a_Packet) const override; virtual signed char GetProtocolEntityStatus(EntityAnimation a_Animation) const override; - virtual UInt32 GetProtocolMobType(eMonsterType a_MobType) override; + virtual UInt32 GetProtocolMobType(eMonsterType a_MobType) const override; + virtual Version GetProtocolVersion() const override; + virtual bool HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType) override; virtual void HandlePacketAdvancementTab(cByteBuffer & a_ByteBuffer); virtual void HandleCraftRecipe(cByteBuffer & a_ByteBuffer); virtual void HandlePacketCraftingBookData(cByteBuffer & a_ByteBuffer); - virtual void WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity) override; - virtual void WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) override; + + virtual void WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity) const override; + virtual void WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) const override; }; @@ -61,8 +63,9 @@ public: protected: - virtual UInt32 GetPacketID(ePacketType a_Packet) override; - virtual Version GetProtocolVersion() override; + virtual UInt32 GetPacketID(ePacketType a_Packet) const override; + virtual Version GetProtocolVersion() const override; + virtual bool HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType) override; }; @@ -81,8 +84,10 @@ public: protected: - virtual Version GetProtocolVersion() override; + virtual Version GetProtocolVersion() const override; + virtual void HandlePacketKeepAlive(cByteBuffer & a_ByteBuffer) override; + virtual void SendKeepAlive(UInt32 a_PingID) override; virtual void SendUnlockRecipe(UInt32 a_RecipeID) override; virtual void SendInitRecipes(UInt32 a_RecipeID) override; |