Fixes! :)

This commit is contained in:
Aidan C. Brady 2014-01-14 22:31:59 -05:00
parent fe2deb9b9b
commit da8a1a78db
2 changed files with 13 additions and 10 deletions

View file

@ -25,13 +25,12 @@ import com.google.common.io.ByteArrayDataInput;
public class TileEntitySalinationController extends TileEntitySalinationTank implements IConfigurable
{
public static final int MAX_WATER = 100000;
public static final int MAX_BRINE = 1000;
public static final int MAX_SOLARS = 4;
public static final int WARMUP = 6000;
public static final int WARMUP = 10000;
public FluidTank waterTank = new FluidTank(MAX_WATER);
public FluidTank waterTank = new FluidTank(0);
public FluidTank brineTank = new FluidTank(MAX_BRINE);
public Set<TileEntitySalinationTank> tankParts = new HashSet<TileEntitySalinationTank>();
@ -140,6 +139,8 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
if(structured)
{
waterTank.setCapacity(getMaxWater());
if(waterTank.getFluid() != null)
{
waterTank.getFluid().amount = Math.min(waterTank.getFluid().amount, getMaxWater());
@ -228,11 +229,11 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
public boolean buildStructure()
{
controllerConflict = false;
updatedThisTick = true;
ForgeDirection right = MekanismUtils.getRight(facing);
height = 0;
controllerConflict = false;
updatedThisTick = true;
if(!scanBottomLayer())
{
@ -465,8 +466,9 @@ public class TileEntitySalinationController extends TileEntitySalinationTank imp
public boolean addSolarPanel(TileEntity tile, int i)
{
if(tile instanceof TileEntityAdvancedSolarGenerator)
if(tile instanceof TileEntityAdvancedSolarGenerator && !tile.isInvalid())
{
System.out.println(tile.xCoord + " " + tile.yCoord + " " + zCoord);
solars[i] = (TileEntityAdvancedSolarGenerator)tile;
return true;
}

View file

@ -28,9 +28,9 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i
{
MekanismUtils.makeBoundingBlock(worldObj, xCoord, yCoord+1, zCoord, Coord4D.get(this));
for(int x=-1; x<=1; x++)
for(int x = -1; x <= 1; x++)
{
for(int z=-1; z<=1; z++)
for(int z = -1; z <= 1; z++)
{
MekanismUtils.makeBoundingBlock(worldObj, xCoord+x, yCoord+2, zCoord+z, Coord4D.get(this));
}
@ -42,14 +42,15 @@ public class TileEntityAdvancedSolarGenerator extends TileEntitySolarGenerator i
{
worldObj.setBlockToAir(xCoord, yCoord+1, zCoord);
for(int x=-1; x<=1; x++)
for(int x = -1; x <= 1; x++)
{
for(int z=-1; z<=1; z++)
for(int z = -1; z <= 1; z++)
{
worldObj.setBlockToAir(xCoord+x, yCoord+2, zCoord+z);
}
}
invalidate();
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
}
}