summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Packetizer.h
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/Packetizer.h
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/Packetizer.h')
-rw-r--r--src/Protocol/Packetizer.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Protocol/Packetizer.h b/src/Protocol/Packetizer.h
index e3a409cf0..22ef01ed9 100644
--- a/src/Protocol/Packetizer.h
+++ b/src/Protocol/Packetizer.h
@@ -125,10 +125,18 @@ public:
}
- /** Writes the specified block position as a single encoded 64-bit BigEndian integer. */
- inline void WritePosition64(int a_BlockX, int a_BlockY, int a_BlockZ)
+ /** Writes the specified block position as a single encoded 64-bit BigEndian integer.
+ The three coordinates are written in XYZ order. */
+ inline void WriteXYZPosition64(int a_BlockX, int a_BlockY, int a_BlockZ)
{
- VERIFY(m_Out.WritePosition64(a_BlockX, a_BlockY, a_BlockZ));
+ VERIFY(m_Out.WriteXYZPosition64(a_BlockX, a_BlockY, a_BlockZ));
+ }
+
+ /** Writes the specified block position as a single encoded 64-bit BigEndian integer.
+ The three coordinates are written in XZY order, in 1.14+. */
+ inline void WriteXZYPosition64(int a_BlockX, int a_BlockY, int a_BlockZ)
+ {
+ VERIFY(m_Out.WriteXZYPosition64(a_BlockX, a_BlockY, a_BlockZ));
}
/** Writes the specified angle using a single byte. */