Java Code Examples for net.minecraft.util.EnumChatFormatting#YELLOW
The following examples show how to use
net.minecraft.util.EnumChatFormatting#YELLOW .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GT_TileEntity_MegaBlastFurnace.java From bartworks with MIT License | 6 votes |
public String[] getInfoData() { int mPollutionReduction = 0; for (GT_MetaTileEntity_Hatch_Muffler e : this.mMufflerHatches) if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(e)) mPollutionReduction = Math.max(e.calculatePollutionReduction(this.mPollution), mPollutionReduction); long storedEnergy = 0L; long maxEnergy = 0L; if (LoaderReference.tectech) { long[] info = getCurrentInfoData(); storedEnergy = info[0]; maxEnergy = info[1]; } for (GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU(); maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity(); } } return new String[]{StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " + EnumChatFormatting.GREEN + this.mProgresstime / 20 + EnumChatFormatting.RESET + " s / " + EnumChatFormatting.YELLOW + this.mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", StatCollector.translateToLocal("GT5U.multiblock.energy") + ": " + EnumChatFormatting.GREEN + storedEnergy + EnumChatFormatting.RESET + " EU / " + EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED + -this.lEUt + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + this.getMaxInputVoltage() + EnumChatFormatting.RESET + " EU/t(*2A) " + StatCollector.translateToLocal("GT5U.machines.tier") + ": " + EnumChatFormatting.YELLOW + GT_Values.VN[GT_Utility.getTier(this.getMaxInputVoltage())] + EnumChatFormatting.RESET, StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + (this.getIdealStatus() - this.getRepairStatus()) + EnumChatFormatting.RESET + " " + StatCollector.translateToLocal("GT5U.multiblock.efficiency") + ": " + EnumChatFormatting.YELLOW + (float) this.mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", StatCollector.translateToLocal("GT5U.multiblock.pollution") + ": " + EnumChatFormatting.GREEN + mPollutionReduction + EnumChatFormatting.RESET + " %"}; }
Example 2
Source File: GT_MetaTileEntity_AirFilter.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 6 votes |
@Override public String[] getInfoData() { return new String[]{ "Progress:", EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+ EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s", "Stored Energy:", EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU / "+ EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU", "Probably uses: "+ EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t", "Max Energy Income: "+ EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t(*2A) Tier: "+ EnumChatFormatting.YELLOW+VN[GT_Utility.getTier(getMaxInputVoltage())]+ EnumChatFormatting.RESET, "Problems: "+ EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+ " Efficiency: "+ EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %", "Pollution reduction: "+ EnumChatFormatting.GREEN + mPollutionReduction/60 + EnumChatFormatting.RESET+" gibbl/s" }; }
Example 3
Source File: ItemLantern.java From GardenCollection with MIT License | 6 votes |
@SideOnly(Side.CLIENT) @Override public void addInformation (ItemStack itemStack, EntityPlayer player, List list, boolean par4) { if (ModBlocks.lantern.isGlass(itemStack)) { String glassName = Blocks.stained_glass.getUnlocalizedName() + "." + ItemDye.field_150923_a[BlockColored.func_150032_b(itemStack.getItemDamage())]; list.add(StatCollector.translateToLocal(glassName + ".name")); } String contents = StatCollector.translateToLocal(ModBlocks.makeName("lanternSource")) + ": " + EnumChatFormatting.YELLOW; String source = ModBlocks.lantern.getLightSource(itemStack); ILanternSource lanternSource = (source != null) ? Api.instance.registries().lanternSources().getLanternSource(source) : null; if (lanternSource != null) contents += StatCollector.translateToLocal(lanternSource.getLanguageKey(itemStack.getItemDamage())); else contents += StatCollector.translateToLocal(ModBlocks.makeName("lanternSource.none")); list.add(contents); }
Example 4
Source File: TT_MetaTileEntity_LowPowerLaserDynamo.java From bartworks with MIT License | 5 votes |
@Override public String[] getDescription() { return new String[]{ this.mDescription, StatCollector.translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + this.getTotalPower() + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" }; }
Example 5
Source File: TT_MetaTileEntity_LowPowerLaserHatch.java From bartworks with MIT License | 5 votes |
@Override public String[] getDescription() { return new String[]{ this.mDescription, StatCollector.translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + this.getTotalPower() + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("tooltip.bw.1.name") + ChatColorHelper.DARKGREEN + " BartWorks" }; }
Example 6
Source File: GuiKeyBindingList.java From ehacks-pro with GNU General Public License v3.0 | 5 votes |
@Override public void drawEntry(int index, int x, int y, int width, int height, Tessellator tesselator, int buttonX, int buttonY, boolean p_148279_9_) { boolean var10 = GuiKeyBindingList.this.parentScreen.currentKeyBinding == this.entryKeybinding; GuiKeyBindingList.this.mc.fontRenderer.drawString(this.keyDesctiption, x + 90 - GuiKeyBindingList.this.maxListLabelWidth, y + height / 2 - GuiKeyBindingList.this.mc.fontRenderer.FONT_HEIGHT / 2, 16777215); this.btnRemove.xPosition = x + 190; this.btnRemove.yPosition = y; this.btnRemove.drawButton(GuiKeyBindingList.this.mc, buttonX, buttonY); this.btnChangeKeyBinding.xPosition = x + 105; this.btnChangeKeyBinding.yPosition = y; this.btnChangeKeyBinding.displayString = GameSettings.getKeyDisplayString(this.entryKeybinding.getKeyCode()); if (var10) { this.btnChangeKeyBinding.displayString = EnumChatFormatting.WHITE + "> " + EnumChatFormatting.YELLOW + this.btnChangeKeyBinding.displayString + EnumChatFormatting.WHITE + " <"; } this.btnChangeKeyBinding.drawButton(GuiKeyBindingList.this.mc, buttonX, buttonY); }
Example 7
Source File: GuiKeyBindingList.java From ehacks-pro with GNU General Public License v3.0 | 5 votes |
@Override public void drawEntry(int index, int x, int y, int width, int height, Tessellator tesselator, int buttonX, int buttonY, boolean p_148279_9_) { boolean var10 = GuiKeyBindingList.this.parentScreen.currentKeyBinding == this.entryKeybinding; GuiKeyBindingList.this.mc.fontRenderer.drawString(this.keyDesctiption, x + 90 - GuiKeyBindingList.this.maxListLabelWidth, y + height / 2 - GuiKeyBindingList.this.mc.fontRenderer.FONT_HEIGHT / 2, 16777215); this.btnReset.xPosition = x + 190; this.btnReset.yPosition = y; this.btnReset.enabled = this.entryKeybinding.getKeyCode() != this.entryKeybinding.getKeyCodeDefault(); this.btnReset.drawButton(GuiKeyBindingList.this.mc, buttonX, buttonY); this.btnChangeKeyBinding.xPosition = x + 105; this.btnChangeKeyBinding.yPosition = y; this.btnChangeKeyBinding.displayString = GameSettings.getKeyDisplayString(this.entryKeybinding.getKeyCode()); boolean var11 = false; if (this.entryKeybinding.getKeyCode() != 0) { ModuleKeyBinding[] var12 = GuiKeyBindingList.this.parentScreen.keyBindings; int var13 = var12.length; for (int var14 = 0; var14 < var13; ++var14) { ModuleKeyBinding var15 = var12[var14]; if (var15 != this.entryKeybinding && var15.getKeyCode() == this.entryKeybinding.getKeyCode()) { var11 = true; break; } } } if (var10) { this.btnChangeKeyBinding.displayString = EnumChatFormatting.WHITE + "> " + EnumChatFormatting.YELLOW + this.btnChangeKeyBinding.displayString + EnumChatFormatting.WHITE + " <"; } else if (var11) { this.btnChangeKeyBinding.displayString = EnumChatFormatting.RED + this.btnChangeKeyBinding.displayString; } this.btnChangeKeyBinding.drawButton(GuiKeyBindingList.this.mc, buttonX, buttonY); }
Example 8
Source File: OptionKeyBind.java From NotEnoughItems with MIT License | 5 votes |
@Override public String getButtonText() { if (hasFocus) return EnumChatFormatting.WHITE + "> " + EnumChatFormatting.YELLOW + "??? " + EnumChatFormatting.WHITE + "<"; if (conflicted()) return EnumChatFormatting.RED + Keyboard.getKeyName(getValue()); return Keyboard.getKeyName(getValue()); }
Example 9
Source File: GuiContainer.java From NotEnoughItems with MIT License | 4 votes |
private void drawSlot(Slot slotIn) { int i = slotIn.xDisplayPosition; int j = slotIn.yDisplayPosition; ItemStack itemstack = slotIn.getStack(); boolean flag = false; boolean flag1 = slotIn == this.clickedSlot && this.draggedStack != null && !this.isRightMouseClick; ItemStack itemstack1 = this.mc.thePlayer.inventory.getItemStack(); String s = null; if (slotIn == this.clickedSlot && this.draggedStack != null && this.isRightMouseClick && itemstack != null) { itemstack = itemstack.copy(); itemstack.stackSize /= 2; } else if (this.dragSplitting && this.dragSplittingSlots.contains(slotIn) && itemstack1 != null) { if (this.dragSplittingSlots.size() == 1) { return; } if (Container.canAddItemToSlot(slotIn, itemstack1, true) && this.inventorySlots.canDragIntoSlot(slotIn)) { itemstack = itemstack1.copy(); flag = true; Container.computeStackSize(this.dragSplittingSlots, this.dragSplittingLimit, itemstack, slotIn.getStack() == null ? 0 : slotIn.getStack().stackSize); if (itemstack.stackSize > itemstack.getMaxStackSize()) { s = EnumChatFormatting.YELLOW + "" + itemstack.getMaxStackSize(); itemstack.stackSize = itemstack.getMaxStackSize(); } if (itemstack.stackSize > slotIn.getItemStackLimit(itemstack)) { s = EnumChatFormatting.YELLOW + "" + slotIn.getItemStackLimit(itemstack); itemstack.stackSize = slotIn.getItemStackLimit(itemstack); } } else { this.dragSplittingSlots.remove(slotIn); this.updateDragSplitting(); } } this.zLevel = 100.0F; this.itemRender.zLevel = 100.0F; if (itemstack == null) { TextureAtlasSprite textureatlassprite = slotIn.getBackgroundSprite(); if (textureatlassprite != null) { GlStateManager.disableLighting(); this.mc.getTextureManager().bindTexture(slotIn.getBackgroundLocation()); this.drawTexturedModalRect(i, j, textureatlassprite, 16, 16); GlStateManager.enableLighting(); flag1 = true; } } if (!flag1) { if (flag) { drawRect(i, j, i + 16, j + 16, -2130706433); } GlStateManager.enableDepth(); manager.renderSlotUnderlay(slotIn); manager.drawSlotItem(slotIn, itemstack, i, j, s); manager.renderSlotOverlay(slotIn); } this.itemRender.zLevel = 0.0F; this.zLevel = 0.0F; }
Example 10
Source File: GuiUniversalSensor.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
public void updateButtons(){ buttonList.clear(); buttonList.add(redstoneButton); if(!te.getSensorSetting().equals("")) { buttonList.add(new GuiButton(1, guiLeft + 70, guiTop + 18, 30, 20, "back")); } else { buttonList.add(new GuiButton(-1, guiLeft + 70, guiTop + 125, 98, 20, I18n.format("gui.universalSensor.button.showRange"))); } String[] directories = SensorHandler.instance().getDirectoriesAtLocation(te.getSensorSetting()); maxPage = (directories.length - 1) / MAX_SENSORS_PER_PAGE + 1; if(page > maxPage) page = maxPage; if(page < 1) page = 1; if(maxPage > 1) { buttonList.add(new GuiButton(2, guiLeft + 70, guiTop + 40 + 22 * MAX_SENSORS_PER_PAGE, 30, 20, "<--")); buttonList.add(new GuiButton(3, guiLeft + 138, guiTop + 40 + 22 * MAX_SENSORS_PER_PAGE, 30, 20, "-->")); } int buttonsOnPage = MAX_SENSORS_PER_PAGE; if(page == maxPage && (directories.length % MAX_SENSORS_PER_PAGE > 0 || directories.length == 0)) { buttonsOnPage = directories.length % MAX_SENSORS_PER_PAGE; } for(int i = 0; i < buttonsOnPage; i++) { String buttonText = directories[i + (page - 1) * MAX_SENSORS_PER_PAGE]; if(SensorHandler.instance().getSensorFromPath(te.getSensorSetting() + "/" + buttonText) != null) { buttonText = EnumChatFormatting.YELLOW + buttonText; } int buttonID = i * 10 + 10 + (page - 1) * MAX_SENSORS_PER_PAGE * 10; int buttonX = guiLeft + 70; int buttonY = guiTop + 40 + i * 22; int buttonWidth = 98; int buttonHeight = 20; if(te.getSensorSetting().equals("")) { ItemStack[] requiredStacks = SensorHandler.instance().getRequiredStacksFromText(buttonText); GuiButtonSpecial button = new GuiButtonSpecial(buttonID, buttonX, buttonY, buttonWidth, buttonHeight, ""); button.setRenderStacks(requiredStacks); button.enabled = te.areGivenUpgradesInserted(requiredStacks); buttonList.add(button); } else { buttonList.add(new GuiButton(buttonID, buttonX, buttonY, buttonWidth, buttonHeight, buttonText)); } } sensorInfoStat.setText(getSensorInfo()); ISensorSetting sensor = SensorHandler.instance().getSensorFromPath(te.getSensorSetting()); boolean textboxEnabled = sensor != null && sensor.needsTextBox(); nameFilterField.setVisible(textboxEnabled); if(!textboxEnabled) nameFilterField.setFocused(false); }