summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_13.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol_1_13.h')
-rw-r--r--src/Protocol/Protocol_1_13.h51
1 files changed, 22 insertions, 29 deletions
diff --git a/src/Protocol/Protocol_1_13.h b/src/Protocol/Protocol_1_13.h
index 53de8bbc1..970625877 100644
--- a/src/Protocol/Protocol_1_13.h
+++ b/src/Protocol/Protocol_1_13.h
@@ -46,33 +46,26 @@ protected:
virtual void SendTabCompletionResults (const AStringVector & a_Results) override;
virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) override;
- /** Translates outgoing packet types. */
- virtual UInt32 GetPacketID(ePacketType a_PacketType) override;
-
+ virtual UInt8 GetEntityMetadataID(EntityMetadata a_Metadata) const;
+ virtual UInt8 GetEntityMetadataID(EntityMetadataType a_FieldType) const;
+ virtual std::pair<short, short> GetItemFromProtocolID(UInt32 a_ProtocolID) const;
+ virtual UInt32 GetPacketID(ePacketType a_PacketType) const override;
+ virtual UInt32 GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) const;
virtual signed char GetProtocolEntityStatus(EntityAnimation a_Animation) const override;
-
- /** Returns 1.13. */
- virtual Version GetProtocolVersion() override;
-
- /** Converts eMonsterType to protocol-specific mob types */
- virtual UInt32 GetProtocolMobType(eMonsterType a_MobType) override;
-
- virtual UInt8 GetEntityMetadataID(EntityMetadata a_Metadata);
- virtual UInt8 GetEntityMetadataID(EntityMetadataType a_FieldType);
- virtual std::pair<short, short> GetItemFromProtocolID(UInt32 a_ProtocolID);
- virtual UInt32 GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta);
- virtual UInt32 GetProtocolItemType(short a_ItemID, short a_ItemDamage);
- virtual UInt32 GetProtocolStatisticType(Statistic a_Statistic);
+ virtual UInt32 GetProtocolItemType(short a_ItemID, short a_ItemDamage) const;
+ virtual UInt32 GetProtocolMobType(eMonsterType a_MobType) const override;
+ virtual UInt32 GetProtocolStatisticType(Statistic a_Statistic) const;
+ virtual Version GetProtocolVersion() const override;
virtual bool HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType) override;
virtual void HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer) override;
virtual void HandlePacketSetBeaconEffect(cByteBuffer & a_ByteBuffer);
- 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;
- virtual void WriteEntityMetadata(cPacketizer & a_Pkt, EntityMetadata a_Metadata, EntityMetadataType a_FieldType);
- virtual void WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity) override;
- virtual void WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) override;
+ virtual bool ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes) const override;
+ virtual void WriteEntityMetadata(cPacketizer & a_Pkt, EntityMetadata a_Metadata, EntityMetadataType a_FieldType) const;
+ virtual void WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity) const override;
+ virtual void WriteItem(cPacketizer & a_Pkt, const cItem & a_Item) const override;
+ virtual void WriteMobMetadata(cPacketizer & a_Pkt, const cMonster & a_Mob) const override;
};
@@ -93,11 +86,11 @@ protected:
virtual void SendBossBarAdd(UInt32 a_UniqueID, const cCompositeChat & a_Title, float a_FractionFilled, BossBarColor a_Color, BossBarDivisionType a_DivisionType, bool a_DarkenSky, bool a_PlayEndMusic, bool a_CreateFog) override;
virtual void SendBossBarUpdateFlags(UInt32 a_UniqueID, bool a_DarkenSky, bool a_PlayEndMusic, bool a_CreateFog) override;
- virtual Version GetProtocolVersion() override;
- virtual std::pair<short, short> GetItemFromProtocolID(UInt32 a_ProtocolID) override;
- virtual UInt32 GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) override;
- virtual UInt32 GetProtocolItemType(short a_ItemID, short a_ItemDamage) override;
- virtual UInt32 GetProtocolStatisticType(Statistic a_Statistic) override;
+ virtual std::pair<short, short> GetItemFromProtocolID(UInt32 a_ProtocolID) const override;
+ virtual UInt32 GetProtocolBlockType(BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) const override;
+ virtual UInt32 GetProtocolItemType(short a_ItemID, short a_ItemDamage) const override;
+ virtual UInt32 GetProtocolStatisticType(Statistic a_Statistic) const override;
+ virtual Version GetProtocolVersion() const override;
};
@@ -115,7 +108,7 @@ public:
protected:
- 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;
+ virtual Version GetProtocolVersion() const override;
+ virtual bool ReadItem(cByteBuffer & a_ByteBuffer, cItem & a_Item, size_t a_KeepRemainingBytes) const override;
+ virtual void WriteItem(cPacketizer & a_Pkt, const cItem & a_Item) const override;
};