summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-21 08:22:25 +0200
committerMattes D <github@xoft.cz>2014-04-21 08:22:25 +0200
commit9f58046b5b6f5a0814461ad68d7612343dc3c2f5 (patch)
tree43b8e75adbcdd072bf28dcd5f969620475fca0f3
parentFixed enchanting return values. (diff)
downloadcuberite-9f58046b5b6f5a0814461ad68d7612343dc3c2f5.tar
cuberite-9f58046b5b6f5a0814461ad68d7612343dc3c2f5.tar.gz
cuberite-9f58046b5b6f5a0814461ad68d7612343dc3c2f5.tar.bz2
cuberite-9f58046b5b6f5a0814461ad68d7612343dc3c2f5.tar.lz
cuberite-9f58046b5b6f5a0814461ad68d7612343dc3c2f5.tar.xz
cuberite-9f58046b5b6f5a0814461ad68d7612343dc3c2f5.tar.zst
cuberite-9f58046b5b6f5a0814461ad68d7612343dc3c2f5.zip
-rw-r--r--src/Protocol/Protocol16x.cpp19
-rw-r--r--src/Protocol/Protocol16x.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/src/Protocol/Protocol16x.cpp b/src/Protocol/Protocol16x.cpp
index 3da23a1dc..8d79213af 100644
--- a/src/Protocol/Protocol16x.cpp
+++ b/src/Protocol/Protocol16x.cpp
@@ -214,6 +214,25 @@ int cProtocol161::ParseEntityAction(void)
+int cProtocol161::ParseLogin(void)
+{
+ // The login packet is sent by Forge clients only
+ // Only parse the packet, do no extra processing
+ // Note that the types and the names have been only guessed and are not verified at all!
+ HANDLE_PACKET_READ(ReadBEInt, int, Int1);
+ HANDLE_PACKET_READ(ReadBEUTF16String16, AString, String1);
+ HANDLE_PACKET_READ(ReadChar, char, Char1);
+ HANDLE_PACKET_READ(ReadChar, char, Char2);
+ HANDLE_PACKET_READ(ReadChar, char, Char3);
+ HANDLE_PACKET_READ(ReadByte, Byte, Byte1);
+ HANDLE_PACKET_READ(ReadByte, Byte, Byte2);
+ return PARSE_OK;
+}
+
+
+
+
+
int cProtocol161::ParsePlayerAbilities(void)
{
HANDLE_PACKET_READ(ReadByte, Byte, Flags);
diff --git a/src/Protocol/Protocol16x.h b/src/Protocol/Protocol16x.h
index ae1388649..8eedce8d5 100644
--- a/src/Protocol/Protocol16x.h
+++ b/src/Protocol/Protocol16x.h
@@ -46,6 +46,7 @@ protected:
virtual void SendWindowOpen (const cWindow & a_Window) override;
virtual int ParseEntityAction (void) override;
+ virtual int ParseLogin (void) override;
virtual int ParsePlayerAbilities(void) override;
// New packets: