summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_13.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-07-19 18:02:14 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-07-19 18:02:14 +0200
commitf4fe137ab5cec2b82bdccec98dd2c2863127207e (patch)
treeae215ac0cd98ae6c6de7667dcc5025209aa85bb3 /src/Protocol/Protocol_1_13.h
parentImplement "caching" in ChunkDataSerializer (diff)
downloadcuberite-f4fe137ab5cec2b82bdccec98dd2c2863127207e.tar
cuberite-f4fe137ab5cec2b82bdccec98dd2c2863127207e.tar.gz
cuberite-f4fe137ab5cec2b82bdccec98dd2c2863127207e.tar.bz2
cuberite-f4fe137ab5cec2b82bdccec98dd2c2863127207e.tar.lz
cuberite-f4fe137ab5cec2b82bdccec98dd2c2863127207e.tar.xz
cuberite-f4fe137ab5cec2b82bdccec98dd2c2863127207e.tar.zst
cuberite-f4fe137ab5cec2b82bdccec98dd2c2863127207e.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_13.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Protocol/Protocol_1_13.h b/src/Protocol/Protocol_1_13.h
index 62f9cf2e4..189dff903 100644
--- a/src/Protocol/Protocol_1_13.h
+++ b/src/Protocol/Protocol_1_13.h
@@ -41,8 +41,9 @@ protected:
// Packet sending:
virtual void SendBlockChange (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override;
+ template <auto Palette> void SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); // Template to avoid virutal calls in tight loops
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;
+ template <auto Palette>void SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes); // Template to avoid virutal calls in tight loops
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, Vector3f a_Src, Vector3f a_Offset, float a_ParticleData, int a_ParticleAmount, std::array<int, 2> a_Data) override;
@@ -92,6 +93,9 @@ public:
protected:
+ 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;
+
/** Returns 1.13.1 */
virtual Version GetProtocolVersion() override;
virtual std::pair<short, short> GetItemFromProtocolID(UInt32 a_ProtocolID) override;