当前位置: 首页>>代码示例>>Java>>正文


Java EnumChatFormatting.RESET属性代码示例

本文整理汇总了Java中net.minecraft.util.EnumChatFormatting.RESET属性的典型用法代码示例。如果您正苦于以下问题:Java EnumChatFormatting.RESET属性的具体用法?Java EnumChatFormatting.RESET怎么用?Java EnumChatFormatting.RESET使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraft.util.EnumChatFormatting的用法示例。


在下文中一共展示了EnumChatFormatting.RESET属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getObjectiveDisplaySlot

/**
 * Returns 'list' for 0, 'sidebar' for 1, 'belowName for 2, otherwise null.
 */
public static String getObjectiveDisplaySlot(int p_96517_0_)
{
    switch (p_96517_0_)
    {
        case 0:
            return "list";

        case 1:
            return "sidebar";

        case 2:
            return "belowName";

        default:
            if (p_96517_0_ >= 3 && p_96517_0_ <= 18)
            {
                EnumChatFormatting enumchatformatting = EnumChatFormatting.func_175744_a(p_96517_0_ - 3);

                if (enumchatformatting != null && enumchatformatting != EnumChatFormatting.RESET)
                {
                    return "sidebar.team." + enumchatformatting.getFriendlyName();
                }
            }

            return null;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:30,代码来源:Scoreboard.java

示例2: drawSlot

protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    SaveFormatComparator saveformatcomparator = (SaveFormatComparator)GuiSelectWorld.this.field_146639_s.get(entryID);
    String s = saveformatcomparator.getDisplayName();

    if (StringUtils.isEmpty(s))
    {
        s = GuiSelectWorld.this.field_146637_u + " " + (entryID + 1);
    }

    String s1 = saveformatcomparator.getFileName();
    s1 = s1 + " (" + GuiSelectWorld.this.field_146633_h.format(new Date(saveformatcomparator.getLastTimePlayed()));
    s1 = s1 + ")";
    String s2 = "";

    if (saveformatcomparator.requiresConversion())
    {
        s2 = GuiSelectWorld.this.field_146636_v + " " + s2;
    }
    else
    {
        s2 = GuiSelectWorld.this.field_146635_w[saveformatcomparator.getEnumGameType().getID()];

        if (saveformatcomparator.isHardcoreModeEnabled())
        {
            s2 = EnumChatFormatting.DARK_RED + I18n.format("gameMode.hardcore", new Object[0]) + EnumChatFormatting.RESET;
        }

        if (saveformatcomparator.getCheatsEnabled())
        {
            s2 = s2 + ", " + I18n.format("selectWorld.cheats", new Object[0]);
        }
    }

    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + 1, 16777215);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s1, p_180791_2_ + 2, p_180791_3_ + 12, 8421504);
    GuiSelectWorld.this.drawString(GuiSelectWorld.this.fontRendererObj, s2, p_180791_2_ + 2, p_180791_3_ + 12 + 10, 8421504);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:38,代码来源:GuiSelectWorld.java

示例3: drawSlot

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);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:52,代码来源:GuiIngestServers.java


注:本文中的net.minecraft.util.EnumChatFormatting.RESET属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。