summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.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_9.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 'src/Protocol/Protocol_1_9.cpp')
-rw-r--r--src/Protocol/Protocol_1_9.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index 9bb0b7d08..5c5227b5f 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -285,7 +285,7 @@ void cProtocol_1_9_0::SendPaintingSpawn(const cPainting & a_Painting)
Pkt.WriteBEUInt64(0);
Pkt.WriteBEUInt64(a_Painting.GetUniqueID());
Pkt.WriteString(a_Painting.GetName());
- Pkt.WritePosition64(static_cast<Int32>(PosX), static_cast<Int32>(PosY), static_cast<Int32>(PosZ));
+ Pkt.WriteXYZPosition64(static_cast<Int32>(PosX), static_cast<Int32>(PosY), static_cast<Int32>(PosZ));
Pkt.WriteBEInt8(static_cast<Int8>(a_Painting.GetProtocolFacing()));
}
@@ -680,7 +680,7 @@ void cProtocol_1_9_0::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
HANDLE_READ(a_ByteBuffer, ReadBEUInt8, UInt8, Status);
int BlockX, BlockY, BlockZ;
- if (!a_ByteBuffer.ReadPosition64(BlockX, BlockY, BlockZ))
+ if (!a_ByteBuffer.ReadXYZPosition64(BlockX, BlockY, BlockZ))
{
return;
}
@@ -696,7 +696,7 @@ void cProtocol_1_9_0::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer)
void cProtocol_1_9_0::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer)
{
int BlockX, BlockY, BlockZ;
- if (!a_ByteBuffer.ReadPosition64(BlockX, BlockY, BlockZ))
+ if (!a_ByteBuffer.ReadXYZPosition64(BlockX, BlockY, BlockZ))
{
return;
}
@@ -873,7 +873,7 @@ void cProtocol_1_9_0::HandlePacketTabComplete(cByteBuffer & a_ByteBuffer)
void cProtocol_1_9_0::HandlePacketUpdateSign(cByteBuffer & a_ByteBuffer)
{
int BlockX, BlockY, BlockZ;
- if (!a_ByteBuffer.ReadPosition64(BlockX, BlockY, BlockZ))
+ if (!a_ByteBuffer.ReadXYZPosition64(BlockX, BlockY, BlockZ))
{
return;
}
@@ -2171,7 +2171,7 @@ void cProtocol_1_9_1::SendLogin(const cPlayer & a_Player, const cWorld & a_World
// Send the spawn position:
{
cPacketizer Pkt(*this, pktSpawnPosition);
- Pkt.WritePosition64(FloorC(a_World.GetSpawnX()), FloorC(a_World.GetSpawnY()), FloorC(a_World.GetSpawnZ()));
+ Pkt.WriteXYZPosition64(FloorC(a_World.GetSpawnX()), FloorC(a_World.GetSpawnY()), FloorC(a_World.GetSpawnZ()));
}
// Send the server difficulty:
@@ -2218,7 +2218,7 @@ void cProtocol_1_9_4::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, c
// 1.9.4 removed the update sign packet and now uses Update Block Entity
cPacketizer Pkt(*this, pktUpdateBlockEntity);
- Pkt.WritePosition64(a_BlockX, a_BlockY, a_BlockZ);
+ Pkt.WriteXYZPosition64(a_BlockX, a_BlockY, a_BlockZ);
Pkt.WriteBEUInt8(9); // Action 9 - update sign
cFastNBTWriter Writer;