本文整理匯總了Java中net.minecraft.util.text.TextFormatting.DARK_RED屬性的典型用法代碼示例。如果您正苦於以下問題:Java TextFormatting.DARK_RED屬性的具體用法?Java TextFormatting.DARK_RED怎麽用?Java TextFormatting.DARK_RED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.minecraft.util.text.TextFormatting
的用法示例。
在下文中一共展示了TextFormatting.DARK_RED屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawGuiContainerForegroundLayer
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
int[] data = ((ContainerBarrel) inventorySlots).data_a;
this.renderHoveredToolTip(mouseX - guiLeft, mouseY - guiTop);
if (mouseX > guiLeft + 62 && mouseX < guiLeft + 114 && mouseY > guiTop + 17 && mouseY < guiTop + 33) {
FluidStack fstack = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null).drain(1000, false);
if (fstack != null) {
ArrayList<String> tooltip = new ArrayList<String>(2);
String color = fstack.getFluid().getTemperature() > 600 ? TextFormatting.GOLD.toString() : fstack.getFluid().getTemperature() < 150 ? TextFormatting.AQUA.toString() : TextFormatting.DARK_AQUA.toString();
tooltip.add(color + fstack.getLocalizedName());
tooltip.add(TextFormatting.GRAY + I18n.format("fluid.quantity.mB", fstack.amount));
drawHoveringText(tooltip, mouseX - guiLeft, mouseY - guiTop);
} else {
drawHoveringText(I18n.format("fluid.none"), mouseX - guiLeft, mouseY - guiTop);
}
} else if (mouseX > guiLeft + 134 && mouseX < guiLeft + 150 && mouseY > guiTop + 20 && mouseY < guiTop + 36) {
String text = TextFormatting.YELLOW + I18n.format("tile.barrel.altar.working");
if (data[3] == 0) text = TextFormatting.GREEN + I18n.format("tile.barrel.altar.none_required");
else if (te.getAltar(false) == null)
text = TextFormatting.DARK_RED + I18n.format("tile.barrel.altar.no_altar");
else if (data[3] == data[1]) text = TextFormatting.GREEN + I18n.format("tile.barrel.altar.done");
drawHoveringText(text, mouseX - guiLeft, mouseY - guiTop);
}
}