Update to 1.4.4 protocol changes and removed weird old gui artifact
This commit is contained in:
1 parent
f2d19d5b83
commit
3d8211b031
5 files changed
+6
-8
No files matched your search
@@ -90,6 +90,9 @@ def readEntityMetadata(FileObject):
|
|||||||
if (val["id"] != -1):
|
if (val["id"] != -1):
|
||||||
val["count"] = readByte(FileObject)
|
val["count"] = readByte(FileObject)
|
||||||
val["damage"] = readShort(FileObject)
|
val["damage"] = readShort(FileObject)
|
||||||
|
nbtDataLength = readShort(FileObject)
|
||||||
|
if (nbtDataLength != -1):
|
||||||
|
val["NBT"] = NBTFile(BytesIO(readByteArray(FileObject, nbtDataLength)), compression=NBTFile.Compression.GZIP)
|
||||||
if ty == 6:
|
if ty == 6:
|
||||||
val = []
|
val = []
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
|
|||||||
@@ -85,11 +85,6 @@ class ServerConnection(threading.Thread):
|
|||||||
response = urllib2.urlopen(url).read()
|
response = urllib2.urlopen(url).read()
|
||||||
|
|
||||||
if(response != "OK"):
|
if(response != "OK"):
|
||||||
#handle gui errors
|
|
||||||
if(self.NoGUI == False):
|
|
||||||
self.window.ConnectPanel.Status.SetFont(wx.Font(15, wx.MODERN, wx.NORMAL, wx.NORMAL, 0, "Minecraft"))
|
|
||||||
self.window.ConnectPanel.Status.SetLabel("Response from sessions.minecraft.net wasn't OK")
|
|
||||||
else:
|
|
||||||
print "Response from sessions.minecraft.net wasn't OK, it was " + response
|
print "Response from sessions.minecraft.net wasn't OK, it was " + response
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ def handle82(FileObject):
|
|||||||
def handle83(FileObject):
|
def handle83(FileObject):
|
||||||
ItemType = DataUtil.readShort(FileObject)
|
ItemType = DataUtil.readShort(FileObject)
|
||||||
ItemID = DataUtil.readShort(FileObject)
|
ItemID = DataUtil.readShort(FileObject)
|
||||||
TextLength = DataUtil.readByte(FileObject)
|
TextLength = DataUtil.readShort(FileObject)
|
||||||
Text = DataUtil.readByteArray(FileObject, TextLength)
|
Text = DataUtil.readByteArray(FileObject, TextLength)
|
||||||
return {'ItemType' : ItemType,
|
return {'ItemType' : ItemType,
|
||||||
'ItemID' : ItemID,
|
'ItemID' : ItemID,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ def sendHandshake(socket, username, host, port):
|
|||||||
socket.send("\x02")
|
socket.send("\x02")
|
||||||
|
|
||||||
#byte - protocol version
|
#byte - protocol version
|
||||||
DataUtil.sendByte(socket, 47)
|
DataUtil.sendByte(socket, 49)
|
||||||
|
|
||||||
#string - username
|
#string - username
|
||||||
DataUtil.sendString(socket, username)
|
DataUtil.sendString(socket, username)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ if __name__ == "__main__":
|
|||||||
derp = loginThread.getResponse()
|
derp = loginThread.getResponse()
|
||||||
if(derp['Response'] != "Good to go!"):
|
if(derp['Response'] != "Good to go!"):
|
||||||
print derp['Response']
|
print derp['Response']
|
||||||
sys.exit()
|
sys.exit(1)
|
||||||
sessionid = derp['SessionID']
|
sessionid = derp['SessionID']
|
||||||
print "Logged in as " + derp['Username'] + "! Your session id is: " + sessionid
|
print "Logged in as " + derp['Username'] + "! Your session id is: " + sessionid
|
||||||
if(options.server != ""):
|
if(options.server != ""):
|
||||||
|
|||||||
Reference in new issue
Block a user