From 7c160cc264fda250756b9a6fd31680568741643e Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Sun, 28 Feb 2016 18:11:50 -0500 Subject: [PATCH] Interface and rendering fixes --- .../mekanism/api/util/UnitDisplayUtils.java | 4 +- .../mekanism/client/gui/GuiBoilerStats.java | 10 +++ .../client/gui/GuiThermoelectricBoiler.java | 21 +++--- .../client/gui/element/GuiBoilerTab.java | 5 +- .../client/render/MekanismRenderer.java | 1 + .../RenderThermoelectricBoiler.java | 64 +++++++++++++++---- src/main/java/mekanism/common/Mekanism.java | 1 + .../common/content/boiler/BoilerCache.java | 55 +++------------- .../content/boiler/BoilerUpdateProtocol.java | 16 +---- .../boiler/SynchronizedBoilerData.java | 8 ++- .../common/tile/TileEntityBoilerCasing.java | 7 +- .../client/gui/GuiIndustrialTurbine.java | 3 +- .../client/gui/GuiTurbineStats.java | 2 +- .../client/gui/element/GuiTurbineTab.java | 6 +- .../render/RenderIndustrialTurbine.java | 41 ++++++------ .../resources/assets/mekanism/lang/en_US.lang | 1 + 16 files changed, 128 insertions(+), 117 deletions(-) create mode 100644 src/main/java/mekanism/client/gui/GuiBoilerStats.java diff --git a/src/main/java/mekanism/api/util/UnitDisplayUtils.java b/src/main/java/mekanism/api/util/UnitDisplayUtils.java index 9dd3e282d..a30eb630a 100644 --- a/src/main/java/mekanism/api/util/UnitDisplayUtils.java +++ b/src/main/java/mekanism/api/util/UnitDisplayUtils.java @@ -37,8 +37,8 @@ public class UnitDisplayUtils public String name; public String symbol; - double zeroOffset; - double intervalSize; + public double zeroOffset; + public double intervalSize; private TemperatureUnit(String s, String s1, double offset, double size) { diff --git a/src/main/java/mekanism/client/gui/GuiBoilerStats.java b/src/main/java/mekanism/client/gui/GuiBoilerStats.java new file mode 100644 index 000000000..521c3b996 --- /dev/null +++ b/src/main/java/mekanism/client/gui/GuiBoilerStats.java @@ -0,0 +1,10 @@ +package mekanism.client.gui; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +@SideOnly(Side.CLIENT) +public class GuiBoilerStats +{ + +} diff --git a/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java b/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java index a514bc9d4..359efc0d7 100644 --- a/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java +++ b/src/main/java/mekanism/client/gui/GuiThermoelectricBoiler.java @@ -7,6 +7,7 @@ import mekanism.api.util.ListUtils; import mekanism.api.util.UnitDisplayUtils; import mekanism.api.util.UnitDisplayUtils.TemperatureUnit; import mekanism.client.gui.element.GuiBoilerTab; +import mekanism.client.gui.element.GuiBoilerTab.BoilerTab; import mekanism.client.gui.element.GuiElement.IInfoHandler; import mekanism.client.gui.element.GuiHeatInfo; import mekanism.client.gui.element.GuiRateBar; @@ -17,7 +18,6 @@ import mekanism.common.tile.TileEntityBoilerCasing; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; -import mekanism.generators.client.gui.element.GuiTurbineTab.BoilerTab; import net.minecraft.entity.player.InventoryPlayer; import net.minecraftforge.fluids.FluidStack; @@ -47,7 +47,7 @@ public class GuiThermoelectricBoiler extends GuiMekanism @Override public double getLevel() { - double max = (int)Math.floor(tileEntity.structure.getHeatAvailable() / tileEntity.structure.enthalpyOfVaporization); + double max = Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization); return (double)tileEntity.structure.lastBoilRate/max; } @@ -57,19 +57,19 @@ public class GuiThermoelectricBoiler extends GuiMekanism @Override public String getTooltip() { - double max = (int)Math.floor(tileEntity.structure.getHeatAvailable() / tileEntity.structure.enthalpyOfVaporization); - double cap = tileEntity.structure.superheatingElements*general.superheatingHeatTransfer; - return LangUtils.localize("gui.maxBoil") + ": " + tileEntity.structure.lastBoilRate + " mB/t"; + int max = (int)Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization); + + return LangUtils.localize("gui.maxBoil") + ": " + max + " mB/t"; } @Override public double getLevel() { - double max = (int)Math.floor(tileEntity.structure.getHeatAvailable() / tileEntity.structure.enthalpyOfVaporization); - - return (double)tileEntity.structure.lastBoilRate/max; + double max = Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization); + double cap = tileEntity.structure.superheatingElements*general.superheatingHeatTransfer; + return max/cap; } - }, MekanismUtils.getResource(ResourceType.GUI, "GuiThermoelectricBoiler.png"), 142, 13)); + }, MekanismUtils.getResource(ResourceType.GUI, "GuiThermoelectricBoiler.png"), 144, 13)); guiElements.add(new GuiHeatInfo(new IInfoHandler() { @Override public List getInfo() @@ -86,9 +86,10 @@ public class GuiThermoelectricBoiler extends GuiMekanism int xAxis = (mouseX - (width - xSize) / 2); int yAxis = (mouseY - (height - ySize) / 2); + fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040); fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 5, 0x404040); - double max = (int)Math.floor(tileEntity.structure.getHeatAvailable() / tileEntity.structure.enthalpyOfVaporization); + double max = (int)Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization); renderScaledText(LangUtils.localize("gui.temp") + ": " + MekanismUtils.getTemperatureDisplay(tileEntity.structure.temperature, TemperatureUnit.AMBIENT), 43, 30, 0x00CD00, 90); renderScaledText(LangUtils.localize("gui.boilRate") + ": " + tileEntity.structure.lastBoilRate + " mB/t", 43, 39, 0x00CD00, 90); diff --git a/src/main/java/mekanism/client/gui/element/GuiBoilerTab.java b/src/main/java/mekanism/client/gui/element/GuiBoilerTab.java index 1105a70e7..fc828cdcd 100644 --- a/src/main/java/mekanism/client/gui/element/GuiBoilerTab.java +++ b/src/main/java/mekanism/client/gui/element/GuiBoilerTab.java @@ -8,7 +8,6 @@ import mekanism.common.network.PacketSimpleGui.SimpleGuiMessage; import mekanism.common.util.LangUtils; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; -import mekanism.generators.client.gui.element.GuiTurbineTab.BoilerTab; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import codechicken.lib.vec.Rectangle4i; @@ -84,7 +83,7 @@ public class GuiBoilerTab extends GuiElement } } - public static enum TurbineTab + public static enum BoilerTab { MAIN("GuiGasesTab.png", 54, "gui.main"), STAT("GuiStatsTab.png", 55, "gui.stats"); @@ -93,7 +92,7 @@ public class GuiBoilerTab extends GuiElement private int guiId; private String desc; - private TurbineTab(String s, int id, String s1) + private BoilerTab(String s, int id, String s1) { path = s; guiId = id; diff --git a/src/main/java/mekanism/client/render/MekanismRenderer.java b/src/main/java/mekanism/client/render/MekanismRenderer.java index 4cf2f83c6..f3f13091e 100644 --- a/src/main/java/mekanism/client/render/MekanismRenderer.java +++ b/src/main/java/mekanism/client/render/MekanismRenderer.java @@ -129,6 +129,7 @@ public class MekanismRenderer FluidRegistry.getFluid("brine").setIcons(event.map.registerIcon("mekanism:LiquidBrine")); FluidRegistry.getFluid("heavywater").setIcons(event.map.registerIcon("mekanism:LiquidHeavyWater")); + FluidRegistry.getFluid("steam").setIcons(event.map.registerIcon("mekanism:LiquidSteam")); for(InfuseType type : InfuseRegistry.getInfuseMap().values()) { diff --git a/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java b/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java index 7b7f02170..53089ce2c 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderThermoelectricBoiler.java @@ -28,7 +28,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer { private static Map cachedLowerFluids = new HashMap(); - private static Map cachedUpperFluids = new HashMap(); + private static Map cachedUpperFluids = new HashMap(); private static Map cachedValveFluids = new HashMap(); private Fluid STEAM = FluidRegistry.getFluid("steam"); @@ -49,13 +49,15 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer RenderData data = new RenderData(); data.location = tileEntity.structure.renderLocation; - data.height = tileEntity.structure.volHeight; + data.height = (tileEntity.structure.upperRenderLocation.yCoord-1)-tileEntity.structure.renderLocation.yCoord; data.length = tileEntity.structure.volLength; data.width = tileEntity.structure.volWidth; + + System.out.println("Water height: " + data.height); bindTexture(MekanismRenderer.getBlocksTexture()); - if(data.location != null && tileEntity.structure.waterStored.getFluid() != null) + if(data.location != null && data.height >= 1 && tileEntity.structure.waterStored.getFluid() != null) { push(); @@ -64,7 +66,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer MekanismRenderer.glowOn(tileEntity.structure.waterStored.getFluid().getLuminosity()); MekanismRenderer.colorFluid(tileEntity.structure.waterStored.getFluid()); - DisplayInteger[] displayList = getListAndRender(data, tileEntity.structure.waterStored.getFluid(), tileEntity.getWorldObj(), cachedLowerFluids); + DisplayInteger[] displayList = getLowerDisplay(data, tileEntity.structure.waterStored.getFluid(), tileEntity.getWorldObj()); if(tileEntity.structure.waterStored.getFluid().isGaseous()) { @@ -103,13 +105,15 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer RenderData data = new RenderData(); data.location = tileEntity.structure.upperRenderLocation; - data.height = tileEntity.structure.volHeight; + data.height = (tileEntity.structure.renderLocation.yCoord+tileEntity.structure.volHeight-2)-(tileEntity.structure.upperRenderLocation.yCoord); data.length = tileEntity.structure.volLength; data.width = tileEntity.structure.volWidth; + + System.out.println("Steam height: " + data.height); bindTexture(MekanismRenderer.getBlocksTexture()); - if(data.location != null && tileEntity.structure.steamStored.getFluid() != null) + if(data.location != null && data.height >= 1 && tileEntity.structure.steamStored.getFluid() != null) { push(); @@ -118,10 +122,10 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer MekanismRenderer.glowOn(tileEntity.structure.steamStored.getFluid().getLuminosity()); MekanismRenderer.colorFluid(tileEntity.structure.steamStored.getFluid()); - DisplayInteger[] displayList = getListAndRender(data, tileEntity.structure.waterStored.getFluid(), tileEntity.getWorldObj(), cachedUpperFluids); + DisplayInteger display = getUpperDisplay(data, tileEntity.structure.steamStored.getFluid(), tileEntity.getWorldObj()); GL11.glColor4f(1F, 1F, 1F, Math.min(1, ((float)tileEntity.structure.steamStored.amount / (float)tileEntity.clientSteamCapacity)+0.3F)); - displayList[getStages(data.height+1)-1].render(); + display.render(); MekanismRenderer.glowOff(); MekanismRenderer.resetColor(); @@ -148,11 +152,11 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); } - private DisplayInteger[] getListAndRender(RenderData data, Fluid fluid, World world, Map map) + private DisplayInteger[] getLowerDisplay(RenderData data, Fluid fluid, World world) { - if(map.containsKey(data)) + if(cachedLowerFluids.containsKey(data)) { - return map.get(data); + return cachedLowerFluids.get(data); } Model3D toReturn = new Model3D(); @@ -162,7 +166,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer final int stages = getStages(data.height); DisplayInteger[] displays = new DisplayInteger[stages]; - map.put(data, displays); + cachedLowerFluids.put(data, displays); for(int i = 0; i < stages; i++) { @@ -186,6 +190,40 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer return displays; } + + private DisplayInteger getUpperDisplay(RenderData data, Fluid fluid, World world) + { + if(cachedUpperFluids.containsKey(data)) + { + return cachedUpperFluids.get(data); + } + + Model3D toReturn = new Model3D(); + toReturn.baseBlock = Blocks.water; + toReturn.setTexture(fluid.getIcon()); + + final int stages = getStages(data.height); + DisplayInteger display = DisplayInteger.createAndStart(); + + cachedUpperFluids.put(data, display); + + if(STEAM.getIcon() != null) + { + toReturn.minX = 0 + .01; + toReturn.minY = 0 + .01; + toReturn.minZ = 0 + .01; + + toReturn.maxX = data.length - .01; + toReturn.maxY = data.height - .01; + toReturn.maxZ = data.width - .01; + + MekanismRenderer.renderObject(toReturn); + } + + GL11.glEndList(); + + return display; + } private DisplayInteger getValveDisplay(ValveRenderData data, Fluid fluid, World world) { @@ -293,7 +331,7 @@ public class RenderThermoelectricBoiler extends TileEntitySpecialRenderer private int getStages(int height) { - return (height-2)*(TankUpdateProtocol.FLUID_PER_TANK/10); + return height*(TankUpdateProtocol.FLUID_PER_TANK/10); } private double getX(int x) diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index 2137b0af8..4d72d89c0 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -1205,6 +1205,7 @@ public class Mekanism GasRegistry.register(new Gas("lithium")).registerFluid(); FluidRegistry.registerFluid(new Fluid("heavyWater")); + FluidRegistry.registerFluid(new Fluid("steam")); for(Resource resource : Resource.values()) { diff --git a/src/main/java/mekanism/common/content/boiler/BoilerCache.java b/src/main/java/mekanism/common/content/boiler/BoilerCache.java index ced5d0b7c..d74696e7d 100644 --- a/src/main/java/mekanism/common/content/boiler/BoilerCache.java +++ b/src/main/java/mekanism/common/content/boiler/BoilerCache.java @@ -1,96 +1,61 @@ package mekanism.common.content.boiler; import mekanism.common.multiblock.MultiblockCache; -import mekanism.common.util.FluidContainerUtils.ContainerEditMode; -import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.fluids.FluidStack; public class BoilerCache extends MultiblockCache { - public ItemStack[] inventory = new ItemStack[2]; - public FluidStack water; public FluidStack steam; - - public ContainerEditMode editMode = ContainerEditMode.BOTH; + + public double temperature; @Override public void apply(SynchronizedBoilerData data) { - data.inventory = inventory; data.waterStored = water; data.steamStored = steam; - data.editMode = editMode; + data.temperature = temperature; } @Override public void sync(SynchronizedBoilerData data) { - inventory = data.inventory; water = data.waterStored; steam = data.steamStored; - editMode = data.editMode; + temperature = data.temperature; } @Override public void load(NBTTagCompound nbtTags) { - editMode = ContainerEditMode.values()[nbtTags.getInteger("editMode")]; - - NBTTagList tagList = nbtTags.getTagList("Items", NBT.TAG_COMPOUND); - inventory = new ItemStack[2]; - - for(int tagCount = 0; tagCount < tagList.tagCount(); tagCount++) - { - NBTTagCompound tagCompound = (NBTTagCompound)tagList.getCompoundTagAt(tagCount); - byte slotID = tagCompound.getByte("Slot"); - - if(slotID >= 0 && slotID < 2) - { - inventory[slotID] = ItemStack.loadItemStackFromNBT(tagCompound); - } - } - if(nbtTags.hasKey("cachedWater")) { water = FluidStack.loadFluidStackFromNBT(nbtTags.getCompoundTag("cachedWater")); } + if(nbtTags.hasKey("cachedSteam")) { steam = FluidStack.loadFluidStackFromNBT(nbtTags.getCompoundTag("cachedSteam")); } + + temperature = nbtTags.getDouble("temperature"); } @Override public void save(NBTTagCompound nbtTags) { - nbtTags.setInteger("editMode", editMode.ordinal()); - - NBTTagList tagList = new NBTTagList(); - - for(int slotCount = 0; slotCount < 2; slotCount++) - { - if(inventory[slotCount] != null) - { - NBTTagCompound tagCompound = new NBTTagCompound(); - tagCompound.setByte("Slot", (byte)slotCount); - inventory[slotCount].writeToNBT(tagCompound); - tagList.appendTag(tagCompound); - } - } - - nbtTags.setTag("Items", tagList); - if(water != null) { nbtTags.setTag("cachedWater", water.writeToNBT(new NBTTagCompound())); } + if(steam != null) { nbtTags.setTag("cachedSteam", steam.writeToNBT(new NBTTagCompound())); } + + nbtTags.setDouble("temperature", temperature); } } diff --git a/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java b/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java index ea584b75b..1935ef159 100644 --- a/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java +++ b/src/main/java/mekanism/common/content/boiler/BoilerUpdateProtocol.java @@ -5,7 +5,6 @@ import java.util.List; import java.util.Set; import mekanism.api.Coord4D; -import mekanism.api.util.StackUtils; import mekanism.common.Mekanism; import mekanism.common.block.BlockBasic.BasicType; import mekanism.common.content.tank.SynchronizedTankData.ValveData; @@ -51,8 +50,6 @@ public class BoilerUpdateProtocol extends UpdateProtocol @Override protected boolean canForm(SynchronizedBoilerData structure) { - System.out.println("hi"); - if(structure.volHeight >= 3) { Set dispersers = new HashSet(); @@ -174,7 +171,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol int steamHeight = (structure.renderLocation.yCoord+structure.volHeight-2)-initDisperser.yCoord; structure.steamVolume = structure.volWidth*structure.volLength*steamHeight; - structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, structure.renderLocation.zCoord, initDisperser.yCoord+1); + structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord+1, structure.renderLocation.zCoord); System.out.println(structure.superheatingElements + " " + structure.waterVolume + " " + structure.steamVolume); return true; @@ -221,15 +218,8 @@ public class BoilerUpdateProtocol extends UpdateProtocol { ((BoilerCache)cache).steam.amount += ((BoilerCache)merge).steam.amount; } - - List rejects = StackUtils.getMergeRejects(((BoilerCache)cache).inventory, ((BoilerCache)merge).inventory); - - if(!rejects.isEmpty()) - { - rejectedItems.addAll(rejects); - } - - StackUtils.merge(((BoilerCache)cache).inventory, ((BoilerCache)merge).inventory); + + ((BoilerCache)cache).temperature = Math.max(((BoilerCache)cache).temperature, ((BoilerCache)merge).temperature); } @Override diff --git a/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java b/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java index a6ab23f2b..c6f871e4a 100644 --- a/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java +++ b/src/main/java/mekanism/common/content/boiler/SynchronizedBoilerData.java @@ -6,6 +6,7 @@ import java.util.Set; import mekanism.api.Coord4D; import mekanism.api.IHeatTransfer; import mekanism.api.MekanismConfig.general; +import mekanism.api.util.UnitDisplayUtils.TemperatureUnit; import mekanism.common.content.tank.SynchronizedTankData.ValveData; import mekanism.common.multiblock.SynchronizedData; import mekanism.common.util.FluidContainerUtils.ContainerEditMode; @@ -15,8 +16,9 @@ import net.minecraftforge.fluids.FluidStack; public class SynchronizedBoilerData extends SynchronizedData implements IHeatTransfer { - public static double CASING_INSULATION_COEFFICIENT = 50; + public static double CASING_INSULATION_COEFFICIENT = 10; public static double CASING_INVERSE_CONDUCTION_COEFFICIENT = 1; + public static double BASE_BOIL_TEMP = 100-(TemperatureUnit.AMBIENT.zeroOffset-TemperatureUnit.CELSIUS.zeroOffset); public FluidStack waterStored; public FluidStack prevWater; @@ -26,6 +28,8 @@ public class SynchronizedBoilerData extends SynchronizedData= 100 && structure.waterStored != null) + if(structure.temperature >= SynchronizedBoilerData.BASE_BOIL_TEMP && structure.waterStored != null) { int steamAmount = structure.steamStored != null ? structure.steamStored.amount : 0; double heatAvailable = structure.getHeatAvailable(); @@ -148,6 +149,8 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock cachedFluids = new HashMap(); + private static Map cachedFluids = new HashMap(); private Fluid STEAM = FluidRegistry.getFluid("steam"); @@ -80,10 +80,10 @@ public class RenderIndustrialTurbine extends TileEntitySpecialRenderer MekanismRenderer.glowOn(tileEntity.structure.fluidStored.getFluid().getLuminosity()); MekanismRenderer.colorFluid(tileEntity.structure.fluidStored.getFluid()); - DisplayInteger[] displayList = getListAndRender(data, tileEntity.getWorldObj()); + DisplayInteger display = getListAndRender(data, tileEntity.getWorldObj()); GL11.glColor4f(1F, 1F, 1F, Math.min(1, ((float)tileEntity.structure.fluidStored.amount / (float)tileEntity.structure.getFluidCapacity())+0.3F)); - displayList[getStages(data.height+1)-1].render(); + display.render(); MekanismRenderer.glowOff(); MekanismRenderer.resetColor(); @@ -130,7 +130,7 @@ public class RenderIndustrialTurbine extends TileEntitySpecialRenderer return z - TileEntityRendererDispatcher.staticPlayerZ; } - private DisplayInteger[] getListAndRender(RenderData data, World world) + private DisplayInteger getListAndRender(RenderData data, World world) { if(cachedFluids.containsKey(data)) { @@ -142,31 +142,26 @@ public class RenderIndustrialTurbine extends TileEntitySpecialRenderer toReturn.setTexture(STEAM.getIcon()); final int stages = getStages(data.height); - DisplayInteger[] displays = new DisplayInteger[stages]; + DisplayInteger display = DisplayInteger.createAndStart(); - cachedFluids.put(data, displays); - - for(int i = 0; i < stages; i++) + cachedFluids.put(data, display); + + if(STEAM.getIcon() != null) { - displays[i] = DisplayInteger.createAndStart(); + toReturn.minX = 0 + .01; + toReturn.minY = 0 + .01; + toReturn.minZ = 0 + .01; - if(STEAM.getIcon() != null) - { - toReturn.minX = 0 + .01; - toReturn.minY = 0 + .01; - toReturn.minZ = 0 + .01; + toReturn.maxX = data.length - .01; + toReturn.maxY = data.height - .01; + toReturn.maxZ = data.width - .01; - toReturn.maxX = data.length - .01; - toReturn.maxY = ((float)i/(float)stages)*(data.height+1) - .01; - toReturn.maxZ = data.width - .01; - - MekanismRenderer.renderObject(toReturn); - } - - GL11.glEndList(); + MekanismRenderer.renderObject(toReturn); } - return displays; + GL11.glEndList(); + + return display; } public static void resetDisplayInts() diff --git a/src/main/resources/assets/mekanism/lang/en_US.lang b/src/main/resources/assets/mekanism/lang/en_US.lang index 4df72124e..fdda278ca 100644 --- a/src/main/resources/assets/mekanism/lang/en_US.lang +++ b/src/main/resources/assets/mekanism/lang/en_US.lang @@ -459,6 +459,7 @@ gui.incomplete=Incomplete gui.inductionMatrix=Induction Matrix gui.matrixStats=Matrix Statistics gui.turbineStats=Turbine Statistics +gui.boilerStats=Boiler Statistics gui.main=Main gui.outputting=Outputting gui.receiving=Receiving