本文整理匯總了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;
}
}
示例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);
}
示例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);
}
}