summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_13.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-07-20 10:56:27 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-07-26 19:55:16 +0200
commit99f8c4434246c3483436b1abac917cf3f23ddbc2 (patch)
tree866c1ad86ac7fc8ca243f5261fca47e6f737e792 /src/Protocol/Protocol_1_13.cpp
parentRemove redundant ErasePowerData call (diff)
downloadcuberite-99f8c4434246c3483436b1abac917cf3f23ddbc2.tar
cuberite-99f8c4434246c3483436b1abac917cf3f23ddbc2.tar.gz
cuberite-99f8c4434246c3483436b1abac917cf3f23ddbc2.tar.bz2
cuberite-99f8c4434246c3483436b1abac917cf3f23ddbc2.tar.lz
cuberite-99f8c4434246c3483436b1abac917cf3f23ddbc2.tar.xz
cuberite-99f8c4434246c3483436b1abac917cf3f23ddbc2.tar.zst
cuberite-99f8c4434246c3483436b1abac917cf3f23ddbc2.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_13.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/src/Protocol/Protocol_1_13.cpp b/src/Protocol/Protocol_1_13.cpp
index c8c2e7383..3ca1cc3a8 100644
--- a/src/Protocol/Protocol_1_13.cpp
+++ b/src/Protocol/Protocol_1_13.cpp
@@ -4,11 +4,12 @@
/*
Implements the 1.13 protocol classes:
- release 1.13 protocol (#393)
+- release 1.13.1 protocol (#401)
+- release 1.13.2 protocol (#404)
*/
#include "Globals.h"
#include "Protocol_1_13.h"
-#include "Packetizer.h"
#include "../Entities/Boat.h"
#include "../Entities/Minecart.h"
@@ -29,7 +30,6 @@ Implements the 1.13 protocol classes:
#include "../Bindings/PluginManager.h"
-#include "Palettes/Upgrade.h"
#include "Palettes/Palette_1_13.h"
#include "Palettes/Palette_1_13_1.h"
@@ -85,7 +85,7 @@ void cProtocol_1_13::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, B
ASSERT(m_State == 3); // In game mode?
cPacketizer Pkt(*this, pktBlockChange);
- Pkt.WritePosition64(a_BlockX, a_BlockY, a_BlockZ);
+ Pkt.WriteXYZPosition64(a_BlockX, a_BlockY, a_BlockZ);
Pkt.WriteVarInt32(Palette(PaletteUpgrade::FromBlock(a_BlockType, a_BlockMeta)));
}
@@ -102,27 +102,6 @@ void cProtocol_1_13::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBloc
-template <auto Palette>
-void cProtocol_1_13::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes)
-{
- ASSERT(m_State == 3); // In game mode?
-
- cPacketizer Pkt(*this, pktBlockChanges);
- Pkt.WriteBEInt32(a_ChunkX);
- Pkt.WriteBEInt32(a_ChunkZ);
- Pkt.WriteVarInt32(static_cast<UInt32>(a_Changes.size()));
- for (const auto & Change : a_Changes)
- {
- Int16 Coords = static_cast<Int16>(Change.m_RelY | (Change.m_RelZ << 8) | (Change.m_RelX << 12));
- Pkt.WriteBEInt16(Coords);
- Pkt.WriteVarInt32(Palette(PaletteUpgrade::FromBlock(Change.m_BlockType, Change.m_BlockMeta)));
- } // for itr - a_Changes[]
-}
-
-
-
-
-
void cProtocol_1_13::SendMapData(const cMap & a_Map, int a_DataStartX, int a_DataStartY)
{
// TODO