Java 类net.minecraft.client.stream.IngestServerTester 实例源码

项目:DecompiledMinecraft    文件:GuiIngestServers.java   
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
项目:BaseClient    文件:GuiIngestServers.java   
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
项目:BaseClient    文件:GuiIngestServers.java   
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
项目:Cauldron    文件:GuiIngestServers.java   
protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p_148126_4_, Tessellator p_148126_5_, int p_148126_6_, int p_148126_7_)
{
    IngestServer ingestserver = GuiIngestServers.this.mc.func_152346_Z().func_152925_v()[p_148126_1_];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = GuiIngestServers.this.mc.func_152346_Z().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (p_148126_1_ < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_148126_2_ -= 15;

    if (this.isSelected(p_148126_1_))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_148126_2_ + 2, p_148126_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_148126_2_ + 2, p_148126_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_148126_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_148126_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
项目:Cauldron    文件:GuiIngestServers.java   
protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p_148126_4_, Tessellator p_148126_5_, int p_148126_6_, int p_148126_7_)
{
    IngestServer ingestserver = GuiIngestServers.this.mc.func_152346_Z().func_152925_v()[p_148126_1_];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = GuiIngestServers.this.mc.func_152346_Z().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (p_148126_1_ < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_148126_2_ -= 15;

    if (this.isSelected(p_148126_1_))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_148126_2_ + 2, p_148126_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_148126_2_ + 2, p_148126_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_148126_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_148126_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}