summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-04 00:29:36 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-04 00:29:36 +0200
commit157f1c6688db8abe72c93a292f43d5a04040e0a4 (patch)
tree6bc75ef3703cd2cbbaeba3c6cb115fed87b62794 /src/Protocol/Protocol17x.h
parentAnvil: switched inflate to stream mode. (diff)
downloadcuberite-157f1c6688db8abe72c93a292f43d5a04040e0a4.tar
cuberite-157f1c6688db8abe72c93a292f43d5a04040e0a4.tar.gz
cuberite-157f1c6688db8abe72c93a292f43d5a04040e0a4.tar.bz2
cuberite-157f1c6688db8abe72c93a292f43d5a04040e0a4.tar.lz
cuberite-157f1c6688db8abe72c93a292f43d5a04040e0a4.tar.xz
cuberite-157f1c6688db8abe72c93a292f43d5a04040e0a4.tar.zst
cuberite-157f1c6688db8abe72c93a292f43d5a04040e0a4.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol17x.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Protocol/Protocol17x.h b/src/Protocol/Protocol17x.h
index ccfa19eb6..ec948e8a1 100644
--- a/src/Protocol/Protocol17x.h
+++ b/src/Protocol/Protocol17x.h
@@ -5,7 +5,8 @@
Declares the 1.7.x protocol classes:
- cProtocol172
- release 1.7.2 protocol (#4)
-(others may be added later in the future for the 1.7 release series)
+ - cProtocol176
+ - release 1.7.6 protocol (#5)
*/
@@ -198,6 +199,11 @@ protected:
{
m_Out.WriteVarUTF8String(a_Value);
}
+
+ void WritePosition(const Vector3i a_Position)
+ {
+ WriteInt64(((Int64)a_Position.x & 0x3FFFFFF) << 38 | ((Int64)a_Position.y & 0xFFF) << 26 | ((Int64)a_Position.z & 0x3FFFFFF));
+ }
void WriteBuf(const char * a_Data, size_t a_Size)
{
@@ -258,12 +264,12 @@ protected:
bool HandlePacket(cByteBuffer & a_ByteBuffer, UInt32 a_PacketType);
// Packet handlers while in the Status state (m_State == 1):
- void HandlePacketStatusPing (cByteBuffer & a_ByteBuffer);
+ void HandlePacketStatusPing(cByteBuffer & a_ByteBuffer);
virtual void HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer);
// Packet handlers while in the Login state (m_State == 2):
- void HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffer);
- void HandlePacketLoginStart (cByteBuffer & a_ByteBuffer);
+ virtual void HandlePacketLoginEncryptionResponse(cByteBuffer & a_ByteBuffer);
+ virtual void HandlePacketLoginStart(cByteBuffer & a_ByteBuffer);
// Packet handlers while in the Game state (m_State == 3):
void HandlePacketAnimation (cByteBuffer & a_ByteBuffer);