本文整理匯總了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);
}
示例2: ItemIlluminator
public ItemIlluminator()
{
super("mystical_illuminator", TextFormatting.GRAY);
setMaxStackSize(1);
}
示例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;
}
}
}
示例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;
}
}
}