Don't auto-build multiblock
This commit is contained in:
parent
992b24e868
commit
514225180b
2 changed files with 28 additions and 13 deletions
|
@ -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,13 +59,27 @@ 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)
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
|
@ -261,12 +264,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)
|
||||
{
|
||||
ForgeDirection left = MekanismUtils.getLeft(facing);
|
||||
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue