diff --git a/networking/NetworkManager.py b/networking/NetworkManager.py index 7113b8a..417209c 100644 --- a/networking/NetworkManager.py +++ b/networking/NetworkManager.py @@ -305,6 +305,8 @@ class PacketListener(threading.Thread): packet = PacketListenerManager.handle6A(self.FileObject) elif (response == "\x6B"): packet = PacketListenerManager.handle6B(self.FileObject) + elif (response == "\x78"): + packet = PacketListenerManager.handle78(self.FileObject) elif (response == "\x82"): packet = PacketListenerManager.handle82(self.FileObject) elif (response == "\x83"): diff --git a/networking/PacketListenerManager.py b/networking/PacketListenerManager.py index 1c9a178..6e648b4 100644 --- a/networking/PacketListenerManager.py +++ b/networking/PacketListenerManager.py @@ -447,6 +447,12 @@ def handle2C(FileObject): key = DataUtil.readString(FileObject) value = DataUtil.readDouble(FileObject) Properties[key] = value + len = DataUtil.readShort(FileObject) + for x in range(len): + uuid_msb = DataUtil.readLong(FileObject) + uuid_lsb = DataUtil.readLong(FileObject) + amount = DataUtil.readDouble(FileObject) + operation = DataUtil.readByte(FileObject) return {'EntityID': EntityID, 'Properties': Properties } @@ -731,6 +737,15 @@ def handle6B(FileObject): 'ClickedItem': ClickedItem } +def handle78(FileObject): + EntityID = DataUtil.readByte(FileObject) + X = DataUtil.readInt(FileObject) + Y = DataUtil.readInt(FileObject) + Z = DataUtil.readInt(FileObject) + return {'EntityID': EntityID, + 'x': X, + 'y': Y, + 'z': Z} def handle82(FileObject): X = DataUtil.readInt(FileObject) diff --git a/networking/PacketSenderManager.py b/networking/PacketSenderManager.py index 825d73a..7b33b4b 100644 --- a/networking/PacketSenderManager.py +++ b/networking/PacketSenderManager.py @@ -13,7 +13,7 @@ def sendHandshake(socket, username, host, port): socket.send("\x02") #byte - protocol version - DataUtil.sendByte(socket, 73) + DataUtil.sendByte(socket, 74) #string - username DataUtil.sendString(socket, username) @@ -56,4 +56,4 @@ def sendFC(socket, secret, token): def sendFF(socket, reason): #string - disconnect reason - DataUtil.sendString(socket, reason) \ No newline at end of file + DataUtil.sendString(socket, reason)