mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
Fixes
This commit is contained in:
1 parent
98f3f544cd
commit
992b24e868
2 files changed
+32
-1
No files matched your search
@@ -35,6 +35,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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user