diff --git a/common/mekanism/client/gui/GuiSalinationController.java b/common/mekanism/client/gui/GuiSalinationController.java index 13498d596..8ddbeeeec 100644 --- a/common/mekanism/client/gui/GuiSalinationController.java +++ b/common/mekanism/client/gui/GuiSalinationController.java @@ -36,10 +36,10 @@ public class GuiSalinationController extends GuiMekanism fontRenderer.drawString(tileEntity.getInvName(), 5, 5, 0x404040); fontRenderer.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040); - fontRenderer.drawString("Structure: " + tileEntity.structured, 50, 21, 0x00CD00); + fontRenderer.drawString("Structure: " + (tileEntity.structured ? MekanismUtils.localize("gui.on") : MekanismUtils.localize("gui.off")), 50, 21, 0x00CD00); fontRenderer.drawString("Height: " + tileEntity.height, 50, 30, 0x00CD00); - fontRenderer.drawString("Solars: " + tileEntity.clientSolarAmount, 50, 39, 0x00CD00); - fontRenderer.drawString("Max Temp: " + tileEntity.getMaxTemperature(), 50, 48, 0x00CD00); + fontRenderer.drawString("Mult: " + getTempMult(), 50, 39, 0x00CD00); + fontRenderer.drawString("Max: " + getMaxTemp(), 50, 48, 0x00CD00); if(xAxis >= 7 && xAxis <= 23 && yAxis >= 14 && yAxis <= 72) { @@ -59,12 +59,26 @@ public class GuiSalinationController extends GuiMekanism super.drawGuiContainerForegroundLayer(mouseX, mouseY); } - public String getTemp() + private String getTemp() { float temp = (float)Math.round((tileEntity.getTemperature()*200)*100)/100F; return temp + " F"; } + + private String getMaxTemp() + { + float temp = (float)Math.round((tileEntity.getMaxTemperature()*200)*100)/100F; + + return temp + " F"; + } + + private String getTempMult() + { + float temp = (float)Math.round((tileEntity.getTempMultiplier())*100)/100F; + + return temp + "x"; + } @Override protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY) diff --git a/common/mekanism/common/tile/TileEntitySalinationController.java b/common/mekanism/common/tile/TileEntitySalinationController.java index 76c0b95b3..f8b7a60d9 100644 --- a/common/mekanism/common/tile/TileEntitySalinationController.java +++ b/common/mekanism/common/tile/TileEntitySalinationController.java @@ -54,6 +54,8 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp public int clientSolarAmount; + public boolean cacheStructure = false; + public TileEntitySalinationController() { super("SalinationController"); @@ -70,9 +72,10 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp { updatedThisTick = false; - if(ticker == 5) + if(ticker == 5 && cacheStructure) { refresh(); + cacheStructure = false; } updateTemperature(); @@ -122,7 +125,7 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp { if(!worldObj.isRemote) { - if(!updatedThisTick) + if(structured && !updatedThisTick) { boolean prev = structured; @@ -194,7 +197,7 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp public float getTempMultiplier() { - return worldObj.getBiomeGenForCoordsBody(xCoord, zCoord).getFloatTemperature()*(getActiveSolars()/MAX_SOLARS); + return worldObj.getBiomeGenForCoordsBody(xCoord, zCoord).getFloatTemperature()*((float)getActiveSolars()/MAX_SOLARS); } public int getActiveSolars() @@ -260,12 +263,6 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp return structured; } - - public ForgeDirection[] getMatrix() - { - return new ForgeDirection[] {MekanismUtils.getBack(facing), MekanismUtils.getLeft(facing), - ForgeDirection.getOrientation(facing), MekanismUtils.getRight(facing)}; - } public boolean scanTopLayer(Coord4D current) { @@ -587,6 +584,8 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp partialWater = nbtTags.getDouble("partialWater"); partialBrine = nbtTags.getDouble("partialBrine"); + + cacheStructure = nbtTags.getBoolean("cacheStructure"); } @Override @@ -599,6 +598,8 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp nbtTags.setDouble("partialWater", partialWater); nbtTags.setDouble("partialBrine", partialBrine); + + nbtTags.setBoolean("cacheStructure", structured); } public void clearStructure()