當前位置: 首頁>>代碼示例>>Java>>正文


Java TextFormatting.GRAY屬性代碼示例

本文整理匯總了Java中net.minecraft.util.text.TextFormatting.GRAY屬性的典型用法代碼示例。如果您正苦於以下問題:Java TextFormatting.GRAY屬性的具體用法?Java TextFormatting.GRAY怎麽用?Java TextFormatting.GRAY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在net.minecraft.util.text.TextFormatting的用法示例。


在下文中一共展示了TextFormatting.GRAY屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ItemEssenceChannelingRod

public ItemEssenceChannelingRod()
{
	super("essence_channeling_rod", TextFormatting.GRAY);
}
 
開發者ID:raphydaphy,項目名稱:ArcaneMagic,代碼行數:4,代碼來源:ItemEssenceChannelingRod.java

示例2: ItemIlluminator

public ItemIlluminator()
{
	super("mystical_illuminator", TextFormatting.GRAY);
	setMaxStackSize(1);
}
 
開發者ID:raphydaphy,項目名稱:ArcaneMagic,代碼行數:5,代碼來源:ItemIlluminator.java

示例3: drawScreen

/**
 * Draws the screen and all the components in it.
 */
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
    super.drawScreen(mouseX, mouseY, partialTicks);
    boolean flag = this.mc.player.capabilities.isCreativeMode;
    int i = this.container.getLapisAmount();

    for (int j = 0; j < 3; ++j)
    {
        int k = this.container.enchantLevels[j];
        Enchantment enchantment = Enchantment.getEnchantmentByID(this.container.enchantClue[j]);
        int l = this.container.worldClue[j];
        int i1 = j + 1;

        if (this.isPointInRegion(60, 14 + 19 * j, 108, 17, mouseX, mouseY) && k > 0 && l >= 0 && enchantment != null)
        {
            List<String> list = Lists.<String>newArrayList();
            list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.format("container.enchant.clue", new Object[] {enchantment.getTranslatedName(l)}));

            if (!flag)
            {
                list.add("");

                if (this.mc.player.experienceLevel < k)
                {
                    list.add(TextFormatting.RED + "Level Requirement: " + this.container.enchantLevels[j]);
                }
                else
                {
                    String s;

                    if (i1 == 1)
                    {
                        s = I18n.format("container.enchant.lapis.one", new Object[0]);
                    }
                    else
                    {
                        s = I18n.format("container.enchant.lapis.many", new Object[] {Integer.valueOf(i1)});
                    }

                    TextFormatting textformatting = i >= i1 ? TextFormatting.GRAY : TextFormatting.RED;
                    list.add(textformatting + "" + s);

                    if (i1 == 1)
                    {
                        s = I18n.format("container.enchant.level.one", new Object[0]);
                    }
                    else
                    {
                        s = I18n.format("container.enchant.level.many", new Object[] {Integer.valueOf(i1)});
                    }

                    list.add(TextFormatting.GRAY + "" + s);
                }
            }

            this.drawHoveringText(list, mouseX, mouseY);
            break;
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:63,代碼來源:GuiEnchantment.java

示例4: drawScreen

/**
 * Draws the screen and all the components in it.
 */
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
    super.drawScreen(mouseX, mouseY, partialTicks);
    boolean flag = this.mc.thePlayer.capabilities.isCreativeMode;
    int i = this.container.getLapisAmount();

    for (int j = 0; j < 3; ++j)
    {
        int k = this.container.enchantLevels[j];
        Enchantment enchantment = Enchantment.getEnchantmentByID(this.container.enchantClue[j]);
        int l = this.container.worldClue[j];
        int i1 = j + 1;

        if (this.isPointInRegion(60, 14 + 19 * j, 108, 17, mouseX, mouseY) && k > 0 && l >= 0 && enchantment != null)
        {
            List<String> list = Lists.<String>newArrayList();
            list.add("" + TextFormatting.WHITE + TextFormatting.ITALIC + I18n.format("container.enchant.clue", new Object[] {enchantment.getTranslatedName(l)}));

            if (!flag)
            {
                list.add("");

                if (this.mc.thePlayer.experienceLevel < k)
                {
                    list.add(TextFormatting.RED + "Level Requirement: " + this.container.enchantLevels[j]);
                }
                else
                {
                    String s;

                    if (i1 == 1)
                    {
                        s = I18n.format("container.enchant.lapis.one", new Object[0]);
                    }
                    else
                    {
                        s = I18n.format("container.enchant.lapis.many", new Object[] {Integer.valueOf(i1)});
                    }

                    TextFormatting textformatting = i >= i1 ? TextFormatting.GRAY : TextFormatting.RED;
                    list.add(textformatting + "" + s);

                    if (i1 == 1)
                    {
                        s = I18n.format("container.enchant.level.one", new Object[0]);
                    }
                    else
                    {
                        s = I18n.format("container.enchant.level.many", new Object[] {Integer.valueOf(i1)});
                    }

                    list.add(TextFormatting.GRAY + "" + s);
                }
            }

            this.drawHoveringText(list, mouseX, mouseY);
            break;
        }
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:63,代碼來源:GuiEnchantment.java


注:本文中的net.minecraft.util.text.TextFormatting.GRAY屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。