diff --git a/common/mekanism/client/gui/GuiEnergyCube.java b/common/mekanism/client/gui/GuiEnergyCube.java index 2b655b03c..4b7f55071 100644 --- a/common/mekanism/client/gui/GuiEnergyCube.java +++ b/common/mekanism/client/gui/GuiEnergyCube.java @@ -1,7 +1,13 @@ package mekanism.client.gui; +import java.util.List; + +import mekanism.api.ListUtils; import mekanism.api.energy.IStrictEnergyStorage; import mekanism.client.gui.GuiEnergyGauge.IEnergyInfoHandler; +import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; +import mekanism.client.gui.GuiSlot.SlotOverlay; +import mekanism.client.gui.GuiSlot.SlotType; import mekanism.common.inventory.container.ContainerEnergyCube; import mekanism.common.tile.TileEntityEnergyCube; import mekanism.common.util.MekanismUtils; @@ -31,17 +37,24 @@ public class GuiEnergyCube extends GuiMekanism return tileEntity; } }, GuiEnergyGauge.Type.WIDE, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiEnergyCube.png"), 55, 18)); + guiElements.add(new GuiEnergyInfo(new IInfoHandler() + { + @Override + public List<String> getInfo() + { + return ListUtils.asList( + "Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), + "Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t"); + } + }, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiEnergyCube.png"))); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiEnergyCube.png"), 16, 34).with(SlotOverlay.MINUS)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiEnergyCube.png"), 142, 34).with(SlotOverlay.PLUS)); } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - String capacityInfo = MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()); - String outputInfo = MekanismUtils.localize("gui.out") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t"; - fontRenderer.drawString(tileEntity.getInvName(), 43, 6, 0x404040); - fontRenderer.drawString(capacityInfo, 45, 40, 0x00CD00); - fontRenderer.drawString(outputInfo, 45, 49, 0x00CD00); fontRenderer.drawString(MekanismUtils.localize("container.inventory"), 8, ySize - 96 + 2, 0x404040); super.drawGuiContainerForegroundLayer(mouseX, mouseY); @@ -56,9 +69,6 @@ public class GuiEnergyCube extends GuiMekanism int guiHeight = (height - ySize) / 2; drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize); - int displayInt = tileEntity.getScaledEnergyLevel(72); - drawTexturedModalRect(guiWidth + 65, guiHeight + 17, 176, 0, displayInt, 10); - super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); } } diff --git a/common/mekanism/client/gui/GuiGasGauge.java b/common/mekanism/client/gui/GuiGasGauge.java index 653b1b385..1122e08bb 100644 --- a/common/mekanism/client/gui/GuiGasGauge.java +++ b/common/mekanism/client/gui/GuiGasGauge.java @@ -33,7 +33,7 @@ public class GuiGasGauge extends GuiGauge @Override public String getTooltipText() { - return infoHandler.getTank().getGas() != null ? infoHandler.getTank().getGas().getGas().getLocalizedName() + ": " + infoHandler.getTank().getStored() + "mB" : MekanismUtils.localize("gui.empty"); + return (infoHandler.getTank().getGas() != null && infoHandler.getTank().getStored() != 0) ? infoHandler.getTank().getGas().getGas().getLocalizedName() + ": " + infoHandler.getTank().getStored() + "mB" : MekanismUtils.localize("gui.empty"); } public static interface IGasInfoHandler diff --git a/common/mekanism/common/inventory/container/ContainerEnergyCube.java b/common/mekanism/common/inventory/container/ContainerEnergyCube.java index 87a3c3566..6bb2b5af0 100644 --- a/common/mekanism/common/inventory/container/ContainerEnergyCube.java +++ b/common/mekanism/common/inventory/container/ContainerEnergyCube.java @@ -19,8 +19,8 @@ public class ContainerEnergyCube extends Container public ContainerEnergyCube(InventoryPlayer inventory, TileEntityEnergyCube unit) { tileEntity = unit; - addSlotToContainer(new SlotCharge(unit, 0, 8, 8)); - addSlotToContainer(new SlotDischarge(unit, 1, 8, 40)); + addSlotToContainer(new SlotDischarge(unit, 1, 17, 35)); + addSlotToContainer(new SlotCharge(unit, 0, 143, 35)); int slotX; diff --git a/common/mekanism/generators/client/gui/GuiBioGenerator.java b/common/mekanism/generators/client/gui/GuiBioGenerator.java index aa0b31c31..a61dfc9dc 100644 --- a/common/mekanism/generators/client/gui/GuiBioGenerator.java +++ b/common/mekanism/generators/client/gui/GuiBioGenerator.java @@ -1,9 +1,19 @@ package mekanism.generators.client.gui; +import java.util.List; + +import mekanism.api.ListUtils; +import mekanism.client.gui.GuiEnergyInfo; +import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; import mekanism.client.gui.GuiMekanism; +import mekanism.client.gui.GuiPowerBar; import mekanism.client.gui.GuiRedstoneControl; +import mekanism.client.gui.GuiSlot; +import mekanism.client.gui.GuiSlot.SlotOverlay; +import mekanism.client.gui.GuiSlot.SlotType; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import mekanism.generators.common.MekanismGenerators; import mekanism.generators.common.inventory.container.ContainerBioGenerator; import mekanism.generators.common.tile.TileEntityBioGenerator; import net.minecraft.entity.player.InventoryPlayer; @@ -23,6 +33,20 @@ public class GuiBioGenerator extends GuiMekanism super(new ContainerBioGenerator(inventory, tentity)); tileEntity = tentity; guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBioGenerator.png"))); + guiElements.add(new GuiEnergyInfo(new IInfoHandler() + { + @Override + public List<String> getInfo() + { + return ListUtils.asList( + "Producing: " + MekanismUtils.getEnergyDisplay(tileEntity.isActive ? MekanismGenerators.bioGeneration : 0) + "/t", + "Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), + "Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t"); + } + }, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBioGenerator.png"))); + guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBioGenerator.png"), 164, 15)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBioGenerator.png"), 16, 34)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBioGenerator.png"), 142, 34).with(SlotOverlay.POWER)); } @Override @@ -30,41 +54,27 @@ public class GuiBioGenerator extends GuiMekanism { super.drawGuiContainerForegroundLayer(mouseX, mouseY); - int xAxis = (mouseX - (width - xSize) / 2); - int yAxis = (mouseY - (height - ySize) / 2); - fontRenderer.drawString(tileEntity.getInvName(), 45, 6, 0x404040); fontRenderer.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040); fontRenderer.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 51, 26, 0x00CD00); fontRenderer.drawString(MekanismUtils.localize("gui.bioGenerator.bioFuel") + ": " + tileEntity.bioFuelSlot.fluidStored, 51, 35, 0x00CD00); fontRenderer.drawString(MekanismUtils.localize("gui.out") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t", 51, 44, 0x00CD00); - - if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69) - { - drawCreativeTabHoveringText(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), xAxis, yAxis); - } } @Override protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) { - super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiBioGenerator.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int guiWidth = (width - xSize) / 2; int guiHeight = (height - ySize) / 2; drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize); - int xAxis = mouseX - guiWidth; - int yAxis = mouseY - guiHeight; - int displayInt; displayInt = tileEntity.getScaledFuelLevel(52); drawTexturedModalRect(guiWidth + 7, guiHeight + 17 + 52 - displayInt, 176, 52 + 52 - displayInt, 4, displayInt); - displayInt = tileEntity.getScaledEnergyLevel(52); - drawTexturedModalRect(guiWidth + 165, guiHeight + 17 + 52 - displayInt, 176, 52 - displayInt, 4, displayInt); + super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); } } diff --git a/common/mekanism/generators/client/gui/GuiHeatGenerator.java b/common/mekanism/generators/client/gui/GuiHeatGenerator.java index 9a6e47355..0c74b9a4a 100644 --- a/common/mekanism/generators/client/gui/GuiHeatGenerator.java +++ b/common/mekanism/generators/client/gui/GuiHeatGenerator.java @@ -1,13 +1,30 @@ package mekanism.generators.client.gui; +import java.util.List; + +import mekanism.api.ListUtils; +import mekanism.api.gas.GasTank; +import mekanism.client.gui.GuiEnergyInfo; +import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; +import mekanism.client.gui.GuiFluidGauge; +import mekanism.client.gui.GuiFluidGauge.IFluidInfoHandler; +import mekanism.client.gui.GuiGasGauge; +import mekanism.client.gui.GuiGasGauge.IGasInfoHandler; +import mekanism.client.gui.GuiGauge.Type; import mekanism.client.gui.GuiMekanism; +import mekanism.client.gui.GuiPowerBar; import mekanism.client.gui.GuiRedstoneControl; +import mekanism.client.gui.GuiSlot; +import mekanism.client.gui.GuiSlot.SlotOverlay; +import mekanism.client.gui.GuiSlot.SlotType; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import mekanism.generators.common.MekanismGenerators; import mekanism.generators.common.inventory.container.ContainerHeatGenerator; import mekanism.generators.common.tile.TileEntityHeatGenerator; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fluids.FluidTank; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; @@ -23,6 +40,27 @@ public class GuiHeatGenerator extends GuiMekanism super(new ContainerHeatGenerator(inventory, tentity)); tileEntity = tentity; guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHeatGenerator.png"))); + guiElements.add(new GuiEnergyInfo(new IInfoHandler() + { + @Override + public List<String> getInfo() + { + return ListUtils.asList( + "Producing: " + MekanismUtils.getEnergyDisplay(tileEntity.isActive ? MekanismGenerators.heatGeneration : tileEntity.getBoost()) + "/t", + "Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), + "Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t"); + } + }, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHeatGenerator.png"))); + guiElements.add(new GuiFluidGauge(new IFluidInfoHandler() { + @Override + public FluidTank getTank() + { + return tileEntity.lavaTank; + } + }, Type.WIDE, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHeatGenerator.png"), 55, 18)); + guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHeatGenerator.png"), 164, 15)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHeatGenerator.png"), 16, 34)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHeatGenerator.png"), 142, 34).with(SlotOverlay.POWER)); } @Override @@ -30,41 +68,19 @@ public class GuiHeatGenerator extends GuiMekanism { super.drawGuiContainerForegroundLayer(mouseX, mouseY); - int xAxis = (mouseX - (width - xSize) / 2); - int yAxis = (mouseY - (height - ySize) / 2); - fontRenderer.drawString(tileEntity.getInvName(), 45, 6, 0x404040); fontRenderer.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040); - fontRenderer.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 51, 26, 0x00CD00); - fontRenderer.drawString(MekanismUtils.localize("gui.heatGenerator.fuel") + ": " + (tileEntity.lavaTank.getFluid() != null ? tileEntity.lavaTank.getFluid().amount : 0), 51, 35, 0x00CD00); - fontRenderer.drawString(MekanismUtils.localize("gui.out") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t", 51, 44, 0x00CD00); - - if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69) - { - drawCreativeTabHoveringText(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), xAxis, yAxis); - } } @Override protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) { - super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiHeatGenerator.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int guiWidth = (width - xSize) / 2; int guiHeight = (height - ySize) / 2; drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize); - int xAxis = mouseX - guiWidth; - int yAxis = mouseY - guiHeight; - - int displayInt; - - displayInt = tileEntity.getScaledFuelLevel(52); - drawTexturedModalRect(guiWidth + 7, guiHeight + 17 + 52 - displayInt, 176, 52 + 52 - displayInt, 4, displayInt); - - displayInt = tileEntity.getScaledEnergyLevel(52); - drawTexturedModalRect(guiWidth + 165, guiHeight + 17 + 52 - displayInt, 176, 52 - displayInt, 4, displayInt); + super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); } } diff --git a/common/mekanism/generators/client/gui/GuiHydrogenGenerator.java b/common/mekanism/generators/client/gui/GuiHydrogenGenerator.java index 169613f72..c3195708a 100644 --- a/common/mekanism/generators/client/gui/GuiHydrogenGenerator.java +++ b/common/mekanism/generators/client/gui/GuiHydrogenGenerator.java @@ -12,6 +12,9 @@ import mekanism.client.gui.GuiGauge.Type; import mekanism.client.gui.GuiMekanism; import mekanism.client.gui.GuiPowerBar; import mekanism.client.gui.GuiRedstoneControl; +import mekanism.client.gui.GuiSlot; +import mekanism.client.gui.GuiSlot.SlotOverlay; +import mekanism.client.gui.GuiSlot.SlotType; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.inventory.container.ContainerHydrogenGenerator; @@ -51,6 +54,8 @@ public class GuiHydrogenGenerator extends GuiMekanism } }, Type.WIDE, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHydrogenGenerator.png"), 55, 18)); guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHydrogenGenerator.png"), 164, 15)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHydrogenGenerator.png"), 16, 34).with(SlotOverlay.MINUS)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiHydrogenGenerator.png"), 142, 34).with(SlotOverlay.POWER)); } @Override diff --git a/common/mekanism/generators/client/gui/GuiSolarGenerator.java b/common/mekanism/generators/client/gui/GuiSolarGenerator.java index f554a551a..534b68ce1 100644 --- a/common/mekanism/generators/client/gui/GuiSolarGenerator.java +++ b/common/mekanism/generators/client/gui/GuiSolarGenerator.java @@ -1,9 +1,19 @@ package mekanism.generators.client.gui; +import java.util.List; + +import mekanism.api.ListUtils; +import mekanism.client.gui.GuiEnergyInfo; +import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; import mekanism.client.gui.GuiMekanism; +import mekanism.client.gui.GuiPowerBar; import mekanism.client.gui.GuiRedstoneControl; +import mekanism.client.gui.GuiSlot; +import mekanism.client.gui.GuiSlot.SlotOverlay; +import mekanism.client.gui.GuiSlot.SlotType; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; +import mekanism.generators.common.MekanismGenerators; import mekanism.generators.common.inventory.container.ContainerSolarGenerator; import mekanism.generators.common.tile.TileEntitySolarGenerator; import net.minecraft.entity.player.InventoryPlayer; @@ -23,6 +33,19 @@ public class GuiSolarGenerator extends GuiMekanism super(new ContainerSolarGenerator(inventory, tentity)); tileEntity = tentity; guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarGenerator.png"))); + guiElements.add(new GuiEnergyInfo(new IInfoHandler() + { + @Override + public List<String> getInfo() + { + return ListUtils.asList( + "Producing: " + MekanismUtils.getEnergyDisplay(tileEntity.isActive ? MekanismGenerators.solarGeneration : 0) + "/t", + "Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), + "Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t"); + } + }, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarGenerator.png"))); + guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarGenerator.png"), 164, 15)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiSolarGenerator.png"), 142, 34).with(SlotOverlay.POWER)); } @Override @@ -38,32 +61,19 @@ public class GuiSolarGenerator extends GuiMekanism fontRenderer.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 51, 26, 0x00CD00); fontRenderer.drawString(MekanismUtils.localize("gui.solarGenerator.sun") + ": " + tileEntity.seesSun, 51, 35, 0x00CD00); fontRenderer.drawString(MekanismUtils.localize("gui.out") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t", 51, 44, 0x00CD00); - - if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69) - { - drawCreativeTabHoveringText(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), xAxis, yAxis); - } } @Override protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) { - super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiSolarGenerator.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int guiWidth = (width - xSize) / 2; int guiHeight = (height - ySize) / 2; drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize); - int xAxis = mouseX - guiWidth; - int yAxis = mouseY - guiHeight; - - int displayInt; - - displayInt = tileEntity.getScaledEnergyLevel(52); - drawTexturedModalRect(guiWidth + 165, guiHeight + 17 + 52 - displayInt, 176, 52 - displayInt, 4, displayInt); - drawTexturedModalRect(guiWidth + 20, guiHeight + 37, 176, (tileEntity.seesSun ? 52 : 64), 12, 12); + + super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); } } diff --git a/common/mekanism/generators/client/gui/GuiWindTurbine.java b/common/mekanism/generators/client/gui/GuiWindTurbine.java index d25324c3c..ffa7ecb82 100644 --- a/common/mekanism/generators/client/gui/GuiWindTurbine.java +++ b/common/mekanism/generators/client/gui/GuiWindTurbine.java @@ -1,8 +1,17 @@ package mekanism.generators.client.gui; +import java.util.List; + import mekanism.api.EnumColor; +import mekanism.api.ListUtils; +import mekanism.client.gui.GuiEnergyInfo; +import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; import mekanism.client.gui.GuiMekanism; +import mekanism.client.gui.GuiPowerBar; import mekanism.client.gui.GuiRedstoneControl; +import mekanism.client.gui.GuiSlot; +import mekanism.client.gui.GuiSlot.SlotOverlay; +import mekanism.client.gui.GuiSlot.SlotType; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.common.MekanismGenerators; @@ -25,6 +34,19 @@ public class GuiWindTurbine extends GuiMekanism super(new ContainerWindTurbine(inventory, tentity)); tileEntity = tentity; guiElements.add(new GuiRedstoneControl(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiWindTurbine.png"))); + guiElements.add(new GuiEnergyInfo(new IInfoHandler() + { + @Override + public List<String> getInfo() + { + return ListUtils.asList( + "Producing: " + MekanismUtils.getEnergyDisplay(tileEntity.isActive ? MekanismGenerators.windGeneration*tileEntity.getMultiplier() : 0) + "/t", + "Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), + "Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t"); + } + }, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiWindTurbine.png"))); + guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiWindTurbine.png"), 164, 15)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiWindTurbine.png"), 142, 34).with(SlotOverlay.POWER)); } @Override @@ -32,9 +54,6 @@ public class GuiWindTurbine extends GuiMekanism { super.drawGuiContainerForegroundLayer(mouseX, mouseY); - int xAxis = (mouseX - (width - xSize) / 2); - int yAxis = (mouseY - (height - ySize) / 2); - fontRenderer.drawString(tileEntity.getInvName(), 45, 6, 0x404040); fontRenderer.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040); fontRenderer.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 51, 26, 0x00CD00); @@ -48,32 +67,19 @@ public class GuiWindTurbine extends GuiMekanism size += 9; fontRenderer.drawString(EnumColor.DARK_RED + "Sky blocked", 51, size, 0x00CD00); } - - if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69) - { - drawCreativeTabHoveringText(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), xAxis, yAxis); - } } @Override protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) { - super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); - mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiWindTurbine.png")); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int guiWidth = (width - xSize) / 2; int guiHeight = (height - ySize) / 2; drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize); - int xAxis = mouseX - guiWidth; - int yAxis = mouseY - guiHeight; - - int displayInt; - - displayInt = tileEntity.getScaledEnergyLevel(52); - drawTexturedModalRect(guiWidth + 165, guiHeight + 17 + 52 - displayInt, 176, 52 - displayInt, 4, displayInt); - drawTexturedModalRect(guiWidth + 20, guiHeight + 37, 176, (tileEntity.getVolumeMultiplier() > 0 ? 52 : 64), 12, 12); + + super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); } } diff --git a/resources/assets/mekanism/gui/GuiBioGenerator.png b/resources/assets/mekanism/gui/GuiBioGenerator.png index ac1916c1f..20c89ae69 100644 Binary files a/resources/assets/mekanism/gui/GuiBioGenerator.png and b/resources/assets/mekanism/gui/GuiBioGenerator.png differ diff --git a/resources/assets/mekanism/gui/GuiEnergyCube.png b/resources/assets/mekanism/gui/GuiEnergyCube.png index 907c03b9e..01cbede55 100644 Binary files a/resources/assets/mekanism/gui/GuiEnergyCube.png and b/resources/assets/mekanism/gui/GuiEnergyCube.png differ diff --git a/resources/assets/mekanism/gui/GuiHeatGenerator.png b/resources/assets/mekanism/gui/GuiHeatGenerator.png index 5cd7a7ec1..404c9eafc 100644 Binary files a/resources/assets/mekanism/gui/GuiHeatGenerator.png and b/resources/assets/mekanism/gui/GuiHeatGenerator.png differ diff --git a/resources/assets/mekanism/gui/GuiHydrogenGenerator.png b/resources/assets/mekanism/gui/GuiHydrogenGenerator.png index 08349b33e..7fcdb0eb4 100644 Binary files a/resources/assets/mekanism/gui/GuiHydrogenGenerator.png and b/resources/assets/mekanism/gui/GuiHydrogenGenerator.png differ diff --git a/resources/assets/mekanism/gui/GuiSolarGenerator.png b/resources/assets/mekanism/gui/GuiSolarGenerator.png index bd89b4715..a8e5ea46d 100644 Binary files a/resources/assets/mekanism/gui/GuiSolarGenerator.png and b/resources/assets/mekanism/gui/GuiSolarGenerator.png differ diff --git a/resources/assets/mekanism/gui/GuiWindTurbine.png b/resources/assets/mekanism/gui/GuiWindTurbine.png index 409ed3353..8706425af 100644 Binary files a/resources/assets/mekanism/gui/GuiWindTurbine.png and b/resources/assets/mekanism/gui/GuiWindTurbine.png differ diff --git a/resources/assets/mekanism/lang/en_US.lang b/resources/assets/mekanism/lang/en_US.lang index 356f1a73e..c823e9d86 100644 --- a/resources/assets/mekanism/lang/en_US.lang +++ b/resources/assets/mekanism/lang/en_US.lang @@ -511,7 +511,7 @@ infuse.bio=Biomass //Generators tile.Generator.HeatGenerator.name=Heat Generator tile.Generator.SolarGenerator.name=Solar Generator -tile.Generator.HydrogenGenerator.name=Hydrogen Generator +tile.Generator.HydrogenGenerator.name=Gas-Burning Generator tile.Generator.BioGenerator.name=Bio-Generator tile.Generator.AdvancedSolarGenerator.name=Advanced Solar Generator tile.Generator.WindTurbine.name=Wind Turbine diff --git a/resources/assets/mekanism/textures/blocks/LiquidEnergy.png b/resources/assets/mekanism/textures/blocks/LiquidEnergy.png index 02303408d..e5d545a4d 100644 Binary files a/resources/assets/mekanism/textures/blocks/LiquidEnergy.png and b/resources/assets/mekanism/textures/blocks/LiquidEnergy.png differ