Java 类net.minecraft.client.network.LanServerInfo 实例源码

项目:morecommands    文件:PatchEntityPlayerSP.java   
@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));
       }
   }
项目:Backmemed    文件:ServerSelectionList.java   
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));
    }
}
项目:Backmemed    文件:GuiMultiplayer.java   
/**
 * 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();
}
项目:Backmemed    文件:GuiMultiplayer.java   
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));
    }
}
项目:CustomWorldGen    文件:ServerSelectionList.java   
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));
    }
}
项目:CustomWorldGen    文件:GuiMultiplayer.java   
/**
 * 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();
}
项目:CustomWorldGen    文件:GuiMultiplayer.java   
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));
    }
}
项目:ExpandedRailsMod    文件:ServerSelectionList.java   
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));
    }
}
项目:ExpandedRailsMod    文件:GuiMultiplayer.java   
/**
 * 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();
}
项目:ExpandedRailsMod    文件:GuiMultiplayer.java   
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));
    }
}
项目:Backmemed    文件:ServerListEntryLanDetected.java   
protected ServerListEntryLanDetected(GuiMultiplayer p_i47141_1_, LanServerInfo p_i47141_2_)
{
    this.screen = p_i47141_1_;
    this.serverData = p_i47141_2_;
    this.mc = Minecraft.getMinecraft();
}
项目:Backmemed    文件:ServerListEntryLanDetected.java   
public LanServerInfo getServerData()
{
    return this.serverData;
}
项目:CustomWorldGen    文件:ServerListEntryLanDetected.java   
protected ServerListEntryLanDetected(GuiMultiplayer p_i47141_1_, LanServerInfo p_i47141_2_)
{
    this.screen = p_i47141_1_;
    this.serverData = p_i47141_2_;
    this.mc = Minecraft.getMinecraft();
}
项目:CustomWorldGen    文件:ServerListEntryLanDetected.java   
public LanServerInfo getServerData()
{
    return this.serverData;
}
项目:ExpandedRailsMod    文件:ServerListEntryLanDetected.java   
protected ServerListEntryLanDetected(GuiMultiplayer p_i47141_1_, LanServerInfo p_i47141_2_)
{
    this.screen = p_i47141_1_;
    this.serverData = p_i47141_2_;
    this.mc = Minecraft.getMinecraft();
}
项目:ExpandedRailsMod    文件:ServerListEntryLanDetected.java   
public LanServerInfo func_189995_a()
{
    return this.serverData;
}