diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-20 10:56:27 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-26 19:55:16 +0200 |
commit | 99f8c4434246c3483436b1abac917cf3f23ddbc2 (patch) | |
tree | 866c1ad86ac7fc8ca243f5261fca47e6f737e792 /src/Protocol/Packetizer.h | |
parent | Remove redundant ErasePowerData call (diff) | |
download | cuberite-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/Packetizer.h | 14 |
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. */ |