if(this.networkManager != null && !(this.currentScreen instanceof ErrorScreen)) {
if(!this.networkManager.isConnected()) {
this.progressBar.setTitle("Connecting..");
this.progressBar.setProgress(0);
} else {
NetworkManager var20 = this.networkManager;
if(this.networkManager.successful) {
NetworkHandler var18 = var20.netHandler;
if(var20.netHandler.connected) {
try {
NetworkHandler var22 = var20.netHandler;
var20.netHandler.channel.read(var22.in);
var4 = 0;
while(var22.in.position() > 0 && var4++ != 100) {
var22.in.flip();
byte var5 = var22.in.get(0);
PacketType var6;
if((var6 = PacketType.packets[var5]) == null) {
throw new IOException("Bad command: " + var5);
}
if(var22.in.remaining() < var6.length + 1) {
var22.in.compact();
break;
}
var22.in.get();
Object[] var7 = new Object[var6.params.length];
for(var8 = 0; var8 < var7.length; ++var8) {
var7[var8] = var22.readObject(var6.params[var8]);
}
NetworkManager var42 = var22.netManager;
if(var22.netManager.successful) {
if(var6 == PacketType.IDENTIFICATION) {
var42.minecraft.progressBar.setTitle(var7[1].toString());
var42.minecraft.progressBar.setText(var7[2].toString());
var42.minecraft.player.userType = ((Byte)var7[3]).byteValue();