From 983f8a6876127050dfcac70219f9c5cf1c93ae21 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Sat, 1 Mar 2014 23:27:06 +0800 Subject: [PATCH] Fixed gutter consuming water above it even when it's full --- .../archaic/fluid/gutter/TileGutter.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/archaic/src/main/java/resonantinduction/archaic/fluid/gutter/TileGutter.java b/archaic/src/main/java/resonantinduction/archaic/fluid/gutter/TileGutter.java index f0dc4742d..02664c3a9 100644 --- a/archaic/src/main/java/resonantinduction/archaic/fluid/gutter/TileGutter.java +++ b/archaic/src/main/java/resonantinduction/archaic/fluid/gutter/TileGutter.java @@ -19,26 +19,20 @@ import calclavia.lib.utility.WorldUtility; */ public class TileGutter extends TilePressurizedNode implements IPressurizedNode { - @Override - public void updateEntity() - { - super.updateEntity(); - - // TODO: Packet before doing. - if (!this.worldObj.isRemote) - sendTankUpdate(); - } - @Override public void refresh() { /** * Drain block above if it is a fluid. */ - FluidStack drain = FluidUtility.drainBlock(worldObj, new Vector3(this).translate(0, 1, 0), true); + Vector3 drainPos = new Vector3(this).translate(0, 1, 0); + FluidStack drain = FluidUtility.drainBlock(worldObj, drainPos, false); if (drain != null) - fill(ForgeDirection.UP, drain, true); + { + if (fill(ForgeDirection.UP, drain, true) > 0) + FluidUtility.drainBlock(worldObj, drainPos, true); + } super.refresh(); }