Update to new protocol
This commit is contained in:
1 parent
a6bc0b722d
commit
cff8c7ea8d
2 files changed
+10
-4
No files matched your search
@@ -187,8 +187,10 @@ def handle17(FileObject):
|
||||
x = DataUtil.readInt(FileObject)
|
||||
y = DataUtil.readInt(FileObject)
|
||||
z = DataUtil.readInt(FileObject)
|
||||
ThrowerEntityID = DataUtil.readInt(FileObject)
|
||||
if(ThrowerEntityID > 0):
|
||||
yaw = DataUtil.readByte(FileObject)
|
||||
pitch = DataUtil.readByte(FileObject)
|
||||
data = DataUtil.readInt(FileObject)
|
||||
if(data > 0):
|
||||
SpeedX = DataUtil.readShort(FileObject)
|
||||
SpeedY = DataUtil.readShort(FileObject)
|
||||
SpeedZ = DataUtil.readShort(FileObject)
|
||||
@@ -197,7 +199,8 @@ def handle17(FileObject):
|
||||
'x' : x,
|
||||
'y' : y,
|
||||
'z' : z,
|
||||
'ThrowerEntityID' : ThrowerEntityID,
|
||||
'yaw' : yaw,
|
||||
'pitch' : pitch,
|
||||
'SpeedX' : SpeedX,
|
||||
'SpeedY' : SpeedY,
|
||||
'SpeedZ' : SpeedZ
|
||||
@@ -208,6 +211,8 @@ def handle17(FileObject):
|
||||
'x' : x,
|
||||
'y' : y,
|
||||
'z' : z,
|
||||
'yaw' : yaw,
|
||||
'pitch' : pitch
|
||||
}
|
||||
|
||||
def handle18(FileObject):
|
||||
@@ -472,6 +477,7 @@ def handle38(FileObject):
|
||||
|
||||
#int - chunk data length
|
||||
ChunkDataLength = DataUtil.readInt(FileObject)
|
||||
DataUtil.readBoolean()
|
||||
FileObject.read(ChunkDataLength) #just gonna ignore this for now
|
||||
|
||||
#metadata - ignoring this
|
||||
|
||||
@@ -12,7 +12,7 @@ def sendHandshake(socket, username, host, port):
|
||||
socket.send("\x02")
|
||||
|
||||
#byte - protocol version
|
||||
DataUtil.sendByte(socket, 49)
|
||||
DataUtil.sendByte(socket, 51)
|
||||
|
||||
#string - username
|
||||
DataUtil.sendString(socket, username)
|
||||
|
||||
Reference in new issue
Block a user