diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2018-08-01 01:21:44 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2019-09-16 15:37:54 +0200 |
commit | 77731f80fb89182e8697d9daad6c8400e480fb6d (patch) | |
tree | c4b7131f8a51e74d1f6c5e7e7f6b1602e39e80c8 /src/Protocol/Protocol_1_13.h | |
parent | GCC: Added pragma to ignore fallthrough warnings within Unicode Inc. code (#4392) (diff) | |
download | cuberite-77731f80fb89182e8697d9daad6c8400e480fb6d.tar cuberite-77731f80fb89182e8697d9daad6c8400e480fb6d.tar.gz cuberite-77731f80fb89182e8697d9daad6c8400e480fb6d.tar.bz2 cuberite-77731f80fb89182e8697d9daad6c8400e480fb6d.tar.lz cuberite-77731f80fb89182e8697d9daad6c8400e480fb6d.tar.xz cuberite-77731f80fb89182e8697d9daad6c8400e480fb6d.tar.zst cuberite-77731f80fb89182e8697d9daad6c8400e480fb6d.zip |
Diffstat (limited to 'src/Protocol/Protocol_1_13.h')
-rw-r--r-- | src/Protocol/Protocol_1_13.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_13.h b/src/Protocol/Protocol_1_13.h new file mode 100644 index 000000000..6eace0567 --- /dev/null +++ b/src/Protocol/Protocol_1_13.h @@ -0,0 +1,58 @@ + +// Protocol_1_13.h + +/* +Declares the 1.13 protocol classes: + - cProtocol_1_13 + - release 1.13 protocol (#393) +(others may be added later in the future for the 1.13 release series) +*/ + + + + + +#pragma once + +#include "Protocol_1_12.h" + + + + + +class cProtocol_1_13 : + public cProtocol_1_12_2 +{ + typedef cProtocol_1_12_2 Super; + +public: + cProtocol_1_13(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State); + +protected: + + virtual UInt32 GetPacketID(ePacketType a_PacketType) override; + + // Packet receiving: + virtual bool HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType) override; + virtual void HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) override; + virtual void HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer) override; + + // Packet sending: + virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override; + virtual void SendBlockChanges (int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) override; + virtual void SendChunkData (int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) override; + virtual void SendMapData (const cMap & a_Map, int a_DataStartX, int a_DataStartY) override; + virtual void SendPaintingSpawn (const cPainting & a_Painting) override; + virtual void SendParticleEffect (const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount) override; + virtual void SendParticleEffect (const AString & a_ParticleName, Vector3f a_Src, Vector3f a_Offset, float a_ParticleData, int a_ParticleAmount, std::array<int, 2> a_Data) override; + virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override; + virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override; + virtual void SendSoundEffect (const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override; + virtual void SendStatistics (const cStatManager & a_Manager) override; + virtual void SendTabCompletionResults (const AStringVector & a_Results) override; + virtual void SendUpdateBlockEntity (cBlockEntity & a_BlockEntity) 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 void WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a_Entity) override; +}; |