diff options
author | Mattes D <github@xoft.cz> | 2015-03-21 13:00:20 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-03-21 13:00:20 +0100 |
commit | b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d (patch) | |
tree | 2cb73fbb8e15ca8f65d794ddb9d9717cdd27f5ce /src/Protocol/Protocol17x.h | |
parent | APIDump: Added inheritance checking. (diff) | |
download | cuberite-b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d.tar cuberite-b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d.tar.gz cuberite-b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d.tar.bz2 cuberite-b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d.tar.lz cuberite-b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d.tar.xz cuberite-b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d.tar.zst cuberite-b1d4b3bb96629b3624e8328d7b1a0bce5333bb7d.zip |
Diffstat (limited to 'src/Protocol/Protocol17x.h')
-rw-r--r-- | src/Protocol/Protocol17x.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Protocol/Protocol17x.h b/src/Protocol/Protocol17x.h index f939bfb5e..2ee247330 100644 --- a/src/Protocol/Protocol17x.h +++ b/src/Protocol/Protocol17x.h @@ -161,22 +161,22 @@ protected: void WriteByte(Byte a_Value) { - m_Out.WriteByte(a_Value); + m_Out.WriteBEUInt8(a_Value); } void WriteChar(char a_Value) { - m_Out.WriteChar(a_Value); + m_Out.WriteBEInt8(a_Value); } void WriteShort(short a_Value) { - m_Out.WriteBEShort(a_Value); + m_Out.WriteBEInt16(a_Value); } - void WriteInt(int a_Value) + void WriteInt(Int32 a_Value) { - m_Out.WriteBEInt(a_Value); + m_Out.WriteBEInt32(a_Value); } void WriteInt64(Int64 a_Value) @@ -297,7 +297,7 @@ protected: /** Parses Vanilla plugin messages into specific ClientHandle calls. The message payload is still in the bytebuffer, to be read by this function. */ - void HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const AString & a_Channel, short a_PayloadLength); + void HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const AString & a_Channel, UInt16 a_PayloadLength); /** Sends the data to the client, encrypting them if needed. */ virtual void SendData(const char * a_Data, size_t a_Size) override; @@ -312,6 +312,9 @@ protected: void StartEncryption(const Byte * a_Key); + /** Converts the BlockFace received by the protocol into eBlockFace constants. + If the received value doesn't match any of our eBlockFace constants, BLOCK_FACE_NONE is returned. */ + eBlockFace FaceIntToBlockFace(Int8 a_FaceInt); } ; |