@Override public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int recipe) { Point point = GuiDraw.getMousePosition(); int xAxis = point.x - (Integer) MekanismUtils.getPrivateValue( gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft); int yAxis = point.y - (Integer) MekanismUtils.getPrivateValue( gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop); if (xAxis >= 6 && xAxis <= 22 && yAxis >= 11 + 7 && yAxis <= 69 + 7) { currenttip.add( LangUtils.localizeFluidStack( ((CachedIORecipe) arecipes.get(recipe)).fluidInput.ingredient)); } else if (xAxis >= 59 && xAxis <= 75 && yAxis >= 19 + 7 && yAxis <= 47 + 7) { currenttip.add( ((CachedIORecipe) arecipes.get(recipe)).outputPair.leftGas.getGas().getLocalizedName()); } else if (xAxis >= 101 && xAxis <= 117 && yAxis >= 19 + 7 && yAxis <= 47 + 7) { currenttip.add( ((CachedIORecipe) arecipes.get(recipe)).outputPair.rightGas.getGas().getLocalizedName()); } return super.handleTooltip(gui, currenttip, recipe); }
@Override @SideOnly(Side.CLIENT) public void addInformation( ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag) { super.addInformation(itemstack, entityplayer, list, flag); list.add( EnumColor.INDIGO + LangUtils.localize("tooltip.name") + ": " + EnumColor.GREY + getName(itemstack)); list.add( EnumColor.AQUA + LangUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + (getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0)); }
@Override public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) { Chunk3D chunk = new Chunk3D(entityplayer); if (getEnergy(itemstack) < ENERGY_USAGE && !entityplayer.capabilities.isCreativeMode) { if (!world.isRemote) { entityplayer.addChatMessage( new ChatComponentText( EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.seismicReader.needsEnergy"))); } return itemstack; } else if (!MekanismUtils.isChunkVibrated(chunk)) { if (!world.isRemote) { entityplayer.addChatMessage( new ChatComponentText( EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.RED + LangUtils.localize("tooltip.seismicReader.noVibrations"))); } return itemstack; } if (!entityplayer.capabilities.isCreativeMode) { setEnergy(itemstack, getEnergy(itemstack) - ENERGY_USAGE); } entityplayer.openGui( Mekanism.instance, 38, world, (int) entityplayer.posX, (int) entityplayer.posY, (int) entityplayer.posZ); return itemstack; }
public List<String> getExpScaledInfo(IUpgradeTile tile) { List<String> ret = new ArrayList<String>(); if (canMultiply()) { double effect = Math.pow(2, (float) tile.getComponent().getUpgrades(this)); ret.add(LangUtils.localize("gui.upgrades.effect") + ": " + effect + "x"); } return ret; }
@Override public String getTooltipText() { if (dummy) { return dummyType.getLocalizedName(); } return (infoHandler.getTank().getGas() != null) ? infoHandler.getTank().getGas().getGas().getLocalizedName() + ": " + infoHandler.getTank().getStored() : LangUtils.localize("gui.empty"); }
@Override public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int recipe) { Point point = GuiDraw.getMousePosition(); Point offset = gui.getRecipePosition(recipe); int xAxis = point.x - (Integer) MekanismUtils.getPrivateValue( gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft) - offset.x; int yAxis = point.y - (Integer) MekanismUtils.getPrivateValue( gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop) - offset.y; if (xAxis >= 6 - 5 && xAxis <= 22 - 5 && yAxis >= 11 - 10 && yAxis <= 69 - 10) { currenttip.add( LangUtils.localizeFluidStack( ((CachedIORecipe) arecipes.get(recipe)).pressurizedRecipe.getInput().getFluid())); } else if (xAxis >= 29 - 5 && xAxis <= 45 - 5 && yAxis >= 11 - 10 && yAxis <= 69 - 10) { currenttip.add( LangUtils.localizeGasStack( ((CachedIORecipe) arecipes.get(recipe)).pressurizedRecipe.getInput().getGas())); } else if (xAxis >= 141 - 5 && xAxis <= 157 - 5 && yAxis >= 41 - 10 && yAxis <= 69 - 10) { currenttip.add( LangUtils.localizeGasStack( ((CachedIORecipe) arecipes.get(recipe)) .pressurizedRecipe .getOutput() .getGasOutput())); } return super.handleTooltip(gui, currenttip, recipe); }
@Override public boolean onSneakRightClick(EntityPlayer player, int side) { activeNodes.clear(); usedNodes.clear(); finishedCalc = false; player.addChatMessage( new ChatComponentText( EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.plenisherReset"))); return true; }
public List<String> getMultScaledInfo(IUpgradeTile tile) { List<String> ret = new ArrayList<String>(); if (canMultiply()) { double effect = Math.pow( general.maxUpgradeMultiplier, (float) tile.getComponent().getUpgrades(this) / (float) getMax()); ret.add( LangUtils.localize("gui.upgrades.effect") + ": " + (Math.round(effect * 100) / 100F) + "x"); } return ret; }
@Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { int xAxis = (mouseX - (width - xSize) / 2); int yAxis = (mouseY - (height - ySize) / 2); fontRendererObj.drawString(tileEntity.getInventoryName(), 37, 4, 0x404040); if (tileEntity.inputTank.getGas() != null) { fontRendererObj.drawString( tileEntity.inputTank.getGas().getGas().getLocalizedName(), 29, 15, 0x00CD00); if (tileEntity.inputTank.getGas().getGas() instanceof OreGas) { fontRendererObj.drawString( "(" + ((OreGas) tileEntity.inputTank.getGas().getGas()).getOreName() + ")", 29, 24, 0x00CD00); } else { CrystallizerRecipe recipe = tileEntity.getRecipe(); if (recipe == null) { fontRendererObj.drawString( "(" + LangUtils.localize("gui.noRecipe") + ")", 29, 24, 0x00CD00); } else { fontRendererObj.drawString( "(" + recipe.recipeOutput.output.getDisplayName() + ")", 29, 24, 0x00CD00); } } } if (renderStack != null) { try { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_LIGHTING); itemRender.renderItemAndEffectIntoGUI( fontRendererObj, mc.getTextureManager(), renderStack, 131, 14); GL11.glDisable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } catch (Exception e) { } } super.drawGuiContainerForegroundLayer(mouseX, mouseY); }
@Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { fontRendererObj.drawString(tileEntity.getName(), 46, 6, 0x404040); if (tileEntity.isFormed()) { fontRendererObj.drawString( EnumColor.DARK_GREEN + LangUtils.localize("gui.passive"), 6, 26, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.minInject") + ": " + (tileEntity.getReactor().getMinInjectionRate(false)), 16, 36, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.ignition") + ": " + (MekanismUtils.getTemperatureDisplay( tileEntity.getReactor().getIgnitionTemperature(false), TemperatureUnit.AMBIENT)), 16, 46, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.maxPlasma") + ": " + (MekanismUtils.getTemperatureDisplay( tileEntity.getReactor().getMaxPlasmaTemperature(false), TemperatureUnit.AMBIENT)), 16, 56, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.maxCasing") + ": " + (MekanismUtils.getTemperatureDisplay( tileEntity.getReactor().getMaxCasingTemperature(false), TemperatureUnit.AMBIENT)), 16, 66, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.passiveGeneration") + ": " + MekanismUtils.getEnergyDisplay( tileEntity.getReactor().getPassiveGeneration(false, false)) + "/t", 16, 76, 0x404040); fontRendererObj.drawString( EnumColor.DARK_BLUE + LangUtils.localize("gui.active"), 6, 92, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.minInject") + ": " + (tileEntity.getReactor().getMinInjectionRate(true)), 16, 102, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.ignition") + ": " + (MekanismUtils.getTemperatureDisplay( tileEntity.getReactor().getIgnitionTemperature(true), TemperatureUnit.AMBIENT)), 16, 112, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.maxPlasma") + ": " + (MekanismUtils.getTemperatureDisplay( tileEntity.getReactor().getMaxPlasmaTemperature(true), TemperatureUnit.AMBIENT)), 16, 122, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.maxCasing") + ": " + (MekanismUtils.getTemperatureDisplay( tileEntity.getReactor().getMaxCasingTemperature(true), TemperatureUnit.AMBIENT)), 16, 132, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.passiveGeneration") + ": " + MekanismUtils.getEnergyDisplay( tileEntity.getReactor().getPassiveGeneration(true, false)) + "/t", 16, 142, 0x404040); fontRendererObj.drawString( LangUtils.localize("gui.steamProduction") + ": " + nf.format(tileEntity.getReactor().getSteamPerTick(false)) + "mB/t", 16, 152, 0x404040); } super.drawGuiContainerForegroundLayer(mouseX, mouseY); }
@Override public String getName() { return LangUtils.localize("tile.FluidTank" + tier.getBaseTier().getSimpleName() + ".name"); }
public String getDescription() { return LangUtils.localize("upgrade." + name + ".desc"); }
public String getName() { return LangUtils.localize("upgrade." + name); }
@Override public String getRecipeName() { return LangUtils.localize("tile.MachineBlock2.ElectrolyticSeparator.name"); }