Java 类net.minecraft.client.gui.ServerListEntryNormal 实例源码

项目: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));
       }
   }
项目:Wurst-MC-1.12-OF    文件:ServerHook.java   
public static void updateLastServerFromDirectConnect(
    GuiMultiplayer guiMultiplayer, ServerData serverData)
{
    currentServerIP = serverData.serverIP;
    if(!currentServerIP.contains(":"))
        currentServerIP += ":25565";

    lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
项目:Wurst-MC-1.12    文件:ServerHook.java   
public static void updateLastServerFromDirectConnect(
    GuiMultiplayer guiMultiplayer, ServerData serverData)
{
    currentServerIP = serverData.serverIP;
    if(!currentServerIP.contains(":"))
        currentServerIP += ":25565";

    lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
项目:ServerObserver    文件:GuiHandler.java   
private ServerData getServerData(final GuiMultiplayer mpgui, final int index) {
    if (index<0)
        return null;
    final IGuiListEntry guilistextended$iguilistentry = this.compat.getListEntry(mpgui, index);
    if (guilistextended$iguilistentry instanceof ServerListEntryNormal)
        return this.compat.getServerData((ServerListEntryNormal) guilistextended$iguilistentry);
    return null;
}
项目:Wurst-MC-1.11    文件:ServerHook.java   
public static void updateLastServerFromDirectConnect(
    GuiMultiplayer guiMultiplayer, ServerData serverData)
{
    currentServerIP = serverData.serverIP;
    if(!currentServerIP.contains(":"))
        currentServerIP += ":25565";

    lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
项目:Wurst-MC-1.10    文件:ServerHook.java   
public static void updateLastServerFromDirectConnect(
    GuiMultiplayer guiMultiplayer, ServerData serverData)
{
    currentServerIP = serverData.serverIP;
    if(!currentServerIP.contains(":"))
        currentServerIP += ":25565";

    lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
项目:Wurst-MC-1.9    文件:ServerHook.java   
public static void updateLastServerFromDirectConnect(
    GuiMultiplayer guiMultiplayer, ServerData serverData)
{
    currentServerIP = serverData.serverIP;
    if(!currentServerIP.contains(":"))
        currentServerIP += ":25565";

    lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
项目:CreeperHostGui    文件:ServerListEntryWrapperOld.java   
@Override
public void draw(ServerListEntryNormal entry, int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isHovering)
{
    entry.drawEntry(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isHovering);
}
项目:CreeperHostGui    文件:ServerListEntryPublic.java   
public ServerListEntryPublic(GuiMultiplayer mp, ServerListEntryNormal wrapped)
{
    super(mp, wrapped.func_148296_a());
    owner = mp;
    this.wrapped = wrapped;
}
项目:CreeperHostGui    文件:ServerListEntryWrapperNew.java   
@Override
public void draw(ServerListEntryNormal entry, int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isHovering)
{
    entry.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isHovering, 0);
}
项目:CreeperHostGui    文件:ServerListEntryPublic.java   
public ServerListEntryPublic(GuiMultiplayer mp, ServerListEntryNormal wrapped)
{
    super(mp, wrapped.getServerData());
    owner = mp;
    this.wrapped = wrapped;
}
项目:CreeperHostGui    文件:GuiMockMultiplayer.java   
@Override
public boolean canMoveUp(ServerListEntryNormal p_175392_1_, int p_175392_2_)
{
    return false;
}
项目:CreeperHostGui    文件:GuiMockMultiplayer.java   
@Override
public boolean canMoveDown(ServerListEntryNormal p_175394_1_, int p_175394_2_)
{
    return false;
}
项目:ServerObserver    文件:Compat.java   
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
    return entry.getServerData();
}
项目:ServerObserver    文件:Compat.java   
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
    return entry.getServerData();
}
项目:ServerObserver    文件:Compat.java   
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
    return entry.getServerData();
}
项目:ServerObserver    文件:Compat.java   
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
    return entry.getServerData();
}
项目:ServerObserver    文件:Compat.java   
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
    return entry.getServerData();
}
项目:ServerObserver    文件:Compat.java   
@Override
public ServerData getServerData(final ServerListEntryNormal entry) {
    return entry.func_148296_a();
}
项目:CustomWorldGen    文件:FMLClientHandler.java   
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
    String tooltip;
    int idx;
    boolean blocked = false;
    if (serverDataTag.containsKey(serverEntry))
    {
        ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
        if ("FML".equals(extendedData.type) && extendedData.isCompatible)
        {
            idx = 0;
            tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
        {
            idx = 16;
            tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("BUKKIT".equals(extendedData.type))
        {
            idx = 32;
            tooltip = String.format("Bukkit modded server");
        }
        else if ("VANILLA".equals(extendedData.type))
        {
            idx = 48;
            tooltip = String.format("Vanilla server");
        }
        else
        {
            idx = 64;
            tooltip = String.format("Unknown server data");
        }
        blocked = extendedData.isBlocked;
    }
    else
    {
        return null;
    }
    this.client.getTextureManager().bindTexture(iconSheet);
    Gui.drawModalRectWithCustomSizedTexture(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
    if (blocked)
    {
        Gui.drawModalRectWithCustomSizedTexture(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
    }

    return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
项目:TRHS_Club_Mod_2016    文件:FMLClientHandler.java   
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
    String tooltip;
    int idx;
    boolean blocked = false;
    if (serverDataTag.containsKey(serverEntry))
    {
        ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
        if ("FML".equals(extendedData.type) && extendedData.isCompatible)
        {
            idx = 0;
            tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
        {
            idx = 16;
            tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("BUKKIT".equals(extendedData.type))
        {
            idx = 32;
            tooltip = String.format("Bukkit modded server");
        }
        else if ("VANILLA".equals(extendedData.type))
        {
            idx = 48;
            tooltip = String.format("Vanilla server");
        }
        else
        {
            idx = 64;
            tooltip = String.format("Unknown server data");
        }
        blocked = extendedData.isBlocked;
    }
    else
    {
        return null;
    }
    this.client.func_110434_K().func_110577_a(iconSheet);
    Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
    if (blocked)
    {
        Gui.func_146110_a(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
    }

    return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
项目:EvenWurse    文件:ServerHook.java   
public static void updateLastServerFromDirectConnect(GuiMultiplayer guiMultiplayer, ServerData serverData) {
    currentServerIP = serverData.serverIP;
    if (!currentServerIP.contains(":")) currentServerIP += ":25565";

    lastServer = new ServerListEntryNormal(guiMultiplayer, serverData);
}
项目:CauldronGit    文件:FMLClientHandler.java   
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
    String tooltip;
    int idx;
    boolean blocked = false;
    if (serverDataTag.containsKey(serverEntry))
    {
        ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
        if ("FML".equals(extendedData.type) && extendedData.isCompatible)
        {
            idx = 0;
            tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
        {
            idx = 16;
            tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("BUKKIT".equals(extendedData.type))
        {
            idx = 32;
            tooltip = String.format("Bukkit modded server");
        }
        else if ("VANILLA".equals(extendedData.type))
        {
            idx = 48;
            tooltip = String.format("Vanilla server");
        }
        else
        {
            idx = 64;
            tooltip = String.format("Unknown server data");
        }
        blocked = extendedData.isBlocked;
    }
    else
    {
        return null;
    }
    this.client.getTextureManager().bindTexture(iconSheet);
    Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
    if (blocked)
    {
        Gui.func_146110_a(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
    }

    return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
项目:Cauldron    文件:FMLClientHandler.java   
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
    String tooltip;
    int idx;
    boolean blocked = false;
    if (serverDataTag.containsKey(serverEntry))
    {
        ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
        if ("FML".equals(extendedData.type) && extendedData.isCompatible)
        {
            idx = 0;
            tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
        {
            idx = 16;
            tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("BUKKIT".equals(extendedData.type))
        {
            idx = 32;
            tooltip = String.format("Bukkit modded server");
        }
        else if ("VANILLA".equals(extendedData.type))
        {
            idx = 48;
            tooltip = String.format("Vanilla server");
        }
        else
        {
            idx = 64;
            tooltip = String.format("Unknown server data");
        }
        blocked = extendedData.isBlocked;
    }
    else
    {
        return null;
    }
    this.client.getTextureManager().bindTexture(iconSheet);
    Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
    if (blocked)
    {
        Gui.func_146110_a(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
    }

    return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
项目:Cauldron    文件:FMLClientHandler.java   
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
    String tooltip;
    int idx;
    boolean blocked = false;
    if (serverDataTag.containsKey(serverEntry))
    {
        ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
        if ("FML".equals(extendedData.type) && extendedData.isCompatible)
        {
            idx = 0;
            tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
        {
            idx = 16;
            tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("BUKKIT".equals(extendedData.type))
        {
            idx = 32;
            tooltip = String.format("Bukkit modded server");
        }
        else if ("VANILLA".equals(extendedData.type))
        {
            idx = 48;
            tooltip = String.format("Vanilla server");
        }
        else
        {
            idx = 64;
            tooltip = String.format("Unknown server data");
        }
        blocked = extendedData.isBlocked;
    }
    else
    {
        return null;
    }
    this.client.getTextureManager().bindTexture(iconSheet);
    Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
    if (blocked)
    {
        Gui.func_146110_a(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
    }

    return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
项目:Cauldron    文件:FMLClientHandler.java   
public String enhanceServerListEntry(ServerListEntryNormal serverListEntry, ServerData serverEntry, int x, int width, int y, int relativeMouseX, int relativeMouseY)
{
    String tooltip;
    int idx;
    boolean blocked = false;
    if (serverDataTag.containsKey(serverEntry))
    {
        ExtendedServerListData extendedData = serverDataTag.get(serverEntry);
        if ("FML".equals(extendedData.type) && extendedData.isCompatible)
        {
            idx = 0;
            tooltip = String.format("Compatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("FML".equals(extendedData.type) && !extendedData.isCompatible)
        {
            idx = 16;
            tooltip = String.format("Incompatible FML modded server\n%d mods present", extendedData.modData.size());
        }
        else if ("BUKKIT".equals(extendedData.type))
        {
            idx = 32;
            tooltip = String.format("Bukkit modded server");
        }
        else if ("VANILLA".equals(extendedData.type))
        {
            idx = 48;
            tooltip = String.format("Vanilla server");
        }
        else
        {
            idx = 64;
            tooltip = String.format("Unknown server data");
        }
        blocked = extendedData.isBlocked;
    }
    else
    {
        return null;
    }
    this.client.getTextureManager().bindTexture(iconSheet);
    Gui.func_146110_a(x + width - 18, y + 10, 0, (float)idx, 16, 16, 256.0f, 256.0f);
    if (blocked)
    {
        Gui.func_146110_a(x + width - 18, y + 10, 0, 80, 16, 16, 256.0f, 256.0f);
    }

    return relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26 ? tooltip : null;
}
项目:CreeperHostGui    文件:IServerListEntryWrapper.java   
void draw(ServerListEntryNormal entry, int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isHovering);
项目:CreeperHostGui    文件:IServerListEntryWrapper.java   
void draw(ServerListEntryNormal entry, int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isHovering);
项目:ServerObserver    文件:ICompat.java   
ServerData getServerData(ServerListEntryNormal entry);