From 8f8693a71eb896ccc7c14c4033ae8d07dae27ac3 Mon Sep 17 00:00:00 2001 From: Howaner Date: Mon, 8 Sep 2014 17:02:54 +0200 Subject: Fixed more 1.8 packets. --- src/ByteBuffer.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ByteBuffer.h') diff --git a/src/ByteBuffer.h b/src/ByteBuffer.h index adaa00330..e200d2a7b 100644 --- a/src/ByteBuffer.h +++ b/src/ByteBuffer.h @@ -64,6 +64,7 @@ public: bool ReadVarInt (UInt32 & a_Value); bool ReadVarUTF8String (AString & a_Value); // string length as VarInt, then string as UTF-8 bool ReadLEInt (int & a_Value); + bool ReadPosition (int & a_BlockX, int & a_BlockY, int & a_BlockZ); /** Reads VarInt, assigns it to anything that can be assigned from an UInt32 (unsigned short, char, Byte, double, ...) */ template bool ReadVarInt(T & a_Value) @@ -90,6 +91,7 @@ public: bool WriteVarInt (UInt32 a_Value); bool WriteVarUTF8String (const AString & a_Value); // string length as VarInt, then string as UTF-8 bool WriteLEInt (int a_Value); + bool WritePosition (int a_BlockX, int a_BlockY, int a_BlockZ); /** Reads a_Count bytes into a_Buffer; returns true if successful */ bool ReadBuf(void * a_Buffer, size_t a_Count); @@ -105,6 +107,9 @@ public: /** Skips reading by a_Count bytes; returns false if not enough bytes in the ringbuffer */ bool SkipRead(size_t a_Count); + + /** Reverse reading by a_Count bytes; returns false if not enough readed bytes in the ringbuffer */ + bool ReverseRead(size_t a_Count); /** Reads all available data into a_Data */ void ReadAll(AString & a_Data); -- cgit v1.2.3 From be6d4a5912abcfe36a1f0fcee9d76e050a58c0ce Mon Sep 17 00:00:00 2001 From: Howaner Date: Thu, 18 Sep 2014 16:04:03 +0200 Subject: 1.8: Simplified item metadata reading. --- src/ByteBuffer.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/ByteBuffer.h') diff --git a/src/ByteBuffer.h b/src/ByteBuffer.h index e200d2a7b..c1c71d8c4 100644 --- a/src/ByteBuffer.h +++ b/src/ByteBuffer.h @@ -107,9 +107,6 @@ public: /** Skips reading by a_Count bytes; returns false if not enough bytes in the ringbuffer */ bool SkipRead(size_t a_Count); - - /** Reverse reading by a_Count bytes; returns false if not enough readed bytes in the ringbuffer */ - bool ReverseRead(size_t a_Count); /** Reads all available data into a_Data */ void ReadAll(AString & a_Data); -- cgit v1.2.3