@Override public void connectToSelected() { ServerSelectionList selector = ReflectionHelper.get(ObfuscatedField.GuiMultiplayer_serverListSelector, serverListSelector, this); if (selector == null) { PatchManager.instance().getGlobalAppliedPatches().setPatchSuccessfullyApplied(PatchList.PATCH_ENTITYPLAYERSP, false); super.connectToSelected(); return; } GuiListExtended.IGuiListEntry entry = selector.getSelected() < 0 ? null : selector.getListEntry(selector.getSelected()); if (entry instanceof ServerListEntryNormal) this.connectToServer(((ServerListEntryNormal) entry).getServerData()); else if (entry instanceof ServerListEntryLanDetected) { LanServerInfo lanserverinfo = ((ServerListEntryLanDetected) entry).getServerData(); this.connectToServer(new ServerData(lanserverinfo.getServerMotd(), lanserverinfo.getServerIpPort(), true)); } }
public void updateNetworkServers(List<LanServerInfo> p_148194_1_) { this.serverListLan.clear(); for (LanServerInfo lanserverinfo : p_148194_1_) { this.serverListLan.add(new ServerListEntryLanDetected(this.owner, lanserverinfo)); } }
/** * Called from the main game loop to update the screen. */ public void updateScreen() { super.updateScreen(); if (this.lanServerList.getWasUpdated()) { List<LanServerInfo> list = this.lanServerList.getLanServers(); this.lanServerList.setWasNotUpdated(); this.serverListSelector.updateNetworkServers(list); } this.oldServerPinger.pingPendingNetworks(); }
public void connectToSelected() { GuiListExtended.IGuiListEntry guilistextended$iguilistentry = this.serverListSelector.getSelected() < 0 ? null : this.serverListSelector.getListEntry(this.serverListSelector.getSelected()); if (guilistextended$iguilistentry instanceof ServerListEntryNormal) { this.connectToServer(((ServerListEntryNormal)guilistextended$iguilistentry).getServerData()); } else if (guilistextended$iguilistentry instanceof ServerListEntryLanDetected) { LanServerInfo lanserverinfo = ((ServerListEntryLanDetected)guilistextended$iguilistentry).getServerData(); this.connectToServer(new ServerData(lanserverinfo.getServerMotd(), lanserverinfo.getServerIpPort(), true)); } }
public void connectToSelected() { GuiListExtended.IGuiListEntry guilistextended$iguilistentry = this.serverListSelector.getSelected() < 0 ? null : this.serverListSelector.getListEntry(this.serverListSelector.getSelected()); if (guilistextended$iguilistentry instanceof ServerListEntryNormal) { this.connectToServer(((ServerListEntryNormal)guilistextended$iguilistentry).getServerData()); } else if (guilistextended$iguilistentry instanceof ServerListEntryLanDetected) { LanServerInfo lanserverinfo = ((ServerListEntryLanDetected)guilistextended$iguilistentry).func_189995_a(); this.connectToServer(new ServerData(lanserverinfo.getServerMotd(), lanserverinfo.getServerIpPort(), true)); } }
protected ServerListEntryLanDetected(GuiMultiplayer p_i47141_1_, LanServerInfo p_i47141_2_) { this.screen = p_i47141_1_; this.serverData = p_i47141_2_; this.mc = Minecraft.getMinecraft(); }
public LanServerInfo getServerData() { return this.serverData; }
public LanServerInfo func_189995_a() { return this.serverData; }