Fixes
This commit is contained in:
parent
98f3f544cd
commit
992b24e868
2 changed files with 32 additions and 1 deletions
|
@ -36,6 +36,11 @@ 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("Height: " + tileEntity.height, 50, 30, 0x00CD00);
|
||||
fontRenderer.drawString("Solars: " + tileEntity.clientSolarAmount, 50, 39, 0x00CD00);
|
||||
fontRenderer.drawString("Max Temp: " + tileEntity.getMaxTemperature(), 50, 48, 0x00CD00);
|
||||
|
||||
if(xAxis >= 7 && xAxis <= 23 && yAxis >= 14 && yAxis <= 72)
|
||||
{
|
||||
drawCreativeTabHoveringText(tileEntity.waterTank.getFluid() != null ? tileEntity.waterTank.getFluid().getFluid().getLocalizedName() + ": " + tileEntity.waterTank.getFluidAmount() : MekanismUtils.localize("gui.empty"), xAxis, yAxis);
|
||||
|
|
|
@ -6,6 +6,9 @@ import java.util.Set;
|
|||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IConfigurable;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tank.TankUpdateProtocol;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.generators.common.tile.TileEntityAdvancedSolarGenerator;
|
||||
|
@ -65,6 +68,8 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
|
|||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
updatedThisTick = false;
|
||||
|
||||
if(ticker == 5)
|
||||
{
|
||||
refresh();
|
||||
|
@ -119,9 +124,16 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
|
|||
{
|
||||
if(!updatedThisTick)
|
||||
{
|
||||
boolean prev = structured;
|
||||
|
||||
clearStructure();
|
||||
structured = buildStructure();
|
||||
|
||||
if(structured != prev)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this), 50D);
|
||||
}
|
||||
|
||||
if(!structured)
|
||||
{
|
||||
temperature = Math.min(getMaxTemperature(), getTemperature());
|
||||
|
@ -172,6 +184,11 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
|
|||
|
||||
public float getMaxTemperature()
|
||||
{
|
||||
if(!structured)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1 + (height-3)*0.5F;
|
||||
}
|
||||
|
||||
|
@ -186,7 +203,7 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
|
|||
|
||||
for(TileEntityAdvancedSolarGenerator solar : solars)
|
||||
{
|
||||
if(solar.seesSun)
|
||||
if(solar != null && solar.seesSun)
|
||||
{
|
||||
ret++;
|
||||
}
|
||||
|
@ -495,10 +512,18 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
|
|||
brineTank.setFluid(null);
|
||||
}
|
||||
|
||||
boolean prev = structured;
|
||||
|
||||
structured = dataStream.readBoolean();
|
||||
controllerConflict = dataStream.readBoolean();
|
||||
clientSolarAmount = dataStream.readInt();
|
||||
height = dataStream.readInt();
|
||||
temperature = dataStream.readFloat();
|
||||
|
||||
if(structured != prev)
|
||||
{
|
||||
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
@ -532,6 +557,7 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
|
|||
data.add(controllerConflict);
|
||||
data.add(getSolarAmount());
|
||||
data.add(height);
|
||||
data.add(temperature);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue