private GuiConnecting(GuiScreen parent, Minecraft mcIn, ServerData serverDataIn) { this.mc = mcIn; this.previousGuiScreen = parent; ServerAddress serveraddress = ServerAddress.fromString(serverDataIn.serverIP); mcIn.loadWorld(null); mcIn.setServerData(serverDataIn); connect(serveraddress.getIP(), serveraddress.getPort()); }
public static LostLuggage.Address resolveServerAddress( String addressString ) { // TODO: Proxy me ServerAddress address = ServerAddress.func_78860_a( addressString ); if( address != null ) { return new LostLuggage.Address( address.getIP() + ":" + address.getPort() ); } return null; }
@Override public boolean recieveCommand(String cmd) throws Exception { if(mc.currentServerData != null){ ServerAddress serverAddress = new ServerAddress(mc.currentServerData.serverIP, mc.currentServerData.field_82821_f); Resilience.getInstance().getLogger().infoChat("Server IP \247b"+InetAddress.getByName(serverAddress.getIP()).getHostAddress()+" \247f(\247b"+mc.currentServerData.serverIP+"\247f)"+" has been copied to you clipboard."); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(InetAddress.getByName(serverAddress.getIP()).getHostAddress()), null); }else{ Resilience.getInstance().getLogger().warningChat("Error, Server not found!"); } return true; }
public GuiConnecting(GuiScreen p_i1181_1_, Minecraft p_i1181_2_, ServerData p_i1181_3_) { this.field_73882_e = p_i1181_2_; this.field_98098_c = p_i1181_1_; ServerAddress var4 = ServerAddress.func_78860_a(p_i1181_3_.field_78845_b); p_i1181_2_.func_71403_a((WorldClient)null); p_i1181_2_.func_71351_a(p_i1181_3_); this.func_74255_a(var4.func_78861_a(), var4.func_78864_b()); }
public static RealmsServerAddress parseString(String p_parseString_0_) { ServerAddress serveraddress = ServerAddress.func_78860_a(p_parseString_0_); return new RealmsServerAddress(serveraddress.getIP(), serveraddress.getPort()); }
public static RealmsServerAddress parseString(String p_parseString_0_) { ServerAddress serveraddress = ServerAddress.fromString(p_parseString_0_); return new RealmsServerAddress(serveraddress.getIP(), serveraddress.getPort()); }
public void run() { this.func_148417_b(I18n.format("mco.connect.connecting", new Object[0])); Session var1 = this.func_148413_b().getSession(); McoClient var2 = new McoClient(var1.getSessionID(), var1.getUsername(), "1.7.2", Minecraft.getMinecraft().getProxy()); boolean var3 = false; boolean var4 = false; int var5 = 5; McoServerAddress var6 = null; boolean var7 = false; for (int var8 = 0; var8 < 10 && !this.func_148418_c(); ++var8) { try { var6 = var2.func_148688_b(this.field_148437_e.field_148812_a); var3 = true; } catch (ExceptionRetryCall var10) { var5 = var10.field_148832_d; } catch (ExceptionMcoService var11) { if (var11.field_148830_c == 6002) { var7 = true; } else { var4 = true; this.func_148416_a(var11.toString()); logger.error("Couldn\'t connect to world", var11); } break; } catch (IOException var12) { logger.error("Couldn\'t parse response connecting to world", var12); } catch (Exception var13) { var4 = true; logger.error("Couldn\'t connect to world", var13); this.func_148416_a(var13.getLocalizedMessage()); } if (var3) { break; } this.func_148429_a(var5); } if (var7) { this.func_148413_b().displayGuiScreen(new GuiScreenReamlsTOS(this.field_148435_f, this.field_148437_e)); } else if (!this.func_148418_c() && !var4) { if (var3) { ServerAddress var14 = ServerAddress.func_78860_a(var6.field_148770_a); this.func_148432_a(var14.getIP(), var14.getPort()); } else { this.func_148413_b().displayGuiScreen(this.field_148435_f); } } }
public void run() { this.func_96576_b(I18n.func_135053_a("mco.connect.connecting")); McoClient var1 = new McoClient(this.func_96578_b().func_110432_I()); boolean var2 = false; boolean var3 = false; int var4 = 5; McoServerAddress var5 = null; for(int var6 = 0; var6 < 10 && !this.func_96577_c(); ++var6) { try { var5 = var1.func_96374_a(this.field_96585_c.field_96408_a); var2 = true; } catch (ExceptionRetryCall var8) { var4 = var8.field_96393_c; } catch (ExceptionMcoService var9) { var3 = true; this.func_96575_a(var9.toString()); Minecraft.func_71410_x().func_98033_al().func_98232_c(var9.toString()); break; } catch (IOException var10) { Minecraft.func_71410_x().func_98033_al().func_98236_b("Realms: could not parse response"); } catch (Exception var11) { var3 = true; this.func_96575_a(var11.getLocalizedMessage()); } if(var2) { break; } this.func_111251_a(var4); } if(!this.func_96577_c() && !var3) { if(var2) { ServerAddress var12 = ServerAddress.func_78860_a(var5.field_96417_a); this.func_96582_a(var12.func_78861_a(), var12.func_78864_b()); } else { this.func_96578_b().func_71373_a(this.field_96584_d); } } }
public void run() { this.setMessage(I18n.getString("mco.connect.connecting")); McoClient mcoclient = new McoClient(this.getMinecraft().getSession()); boolean flag = false; boolean flag1 = false; int i = 5; McoServerAddress mcoserveraddress = null; for (int j = 0; j < 10 && !this.wasScreenClosed(); ++j) { try { mcoserveraddress = mcoclient.func_96374_a(this.field_96585_c.field_96408_a); flag = true; } catch (ExceptionRetryCall exceptionretrycall) { i = exceptionretrycall.field_96393_c; } catch (ExceptionMcoService exceptionmcoservice) { flag1 = true; this.setFailedMessage(exceptionmcoservice.toString()); Minecraft.getMinecraft().getLogAgent().logSevere(exceptionmcoservice.toString()); break; } catch (IOException ioexception) { Minecraft.getMinecraft().getLogAgent().logWarning("Realms: could not parse response"); } catch (Exception exception) { flag1 = true; this.setFailedMessage(exception.getLocalizedMessage()); } if (flag) { break; } this.func_111251_a(i); } if (!this.wasScreenClosed() && !flag1) { if (flag) { ServerAddress serveraddress = ServerAddress.func_78860_a(mcoserveraddress.field_96417_a); this.func_96582_a(serveraddress.getIP(), serveraddress.getPort()); } else { this.getMinecraft().displayGuiScreen(this.field_96584_d); } } }