From da8a1a78db2ed8588ee5ecddb884d271e8ace4f7 Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Tue, 14 Jan 2014 22:31:59 -0500 Subject: [PATCH] Fixes! :) --- .../tile/TileEntitySalinationController.java | 14 ++++++++------ .../tile/TileEntityAdvancedSolarGenerator.java | 9 +++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/common/mekanism/common/tile/TileEntitySalinationController.java b/common/mekanism/common/tile/TileEntitySalinationController.java index afc103aa5..eac0a8380 100644 --- a/common/mekanism/common/tile/TileEntitySalinationController.java +++ b/common/mekanism/common/tile/TileEntitySalinationController.java @@ -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 tankParts = new HashSet(); @@ -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; } diff --git a/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java b/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java index e469eb60d..9eb37d7da 100644 --- a/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java +++ b/common/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java @@ -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); } }