Fixed gutter consuming water above it even when it's full
This commit is contained in:
parent
9ad8de5d19
commit
983f8a6876
1 changed files with 6 additions and 12 deletions
|
@ -19,26 +19,20 @@ import calclavia.lib.utility.WorldUtility;
|
||||||
*/
|
*/
|
||||||
public class TileGutter extends TilePressurizedNode implements IPressurizedNode
|
public class TileGutter extends TilePressurizedNode implements IPressurizedNode
|
||||||
{
|
{
|
||||||
@Override
|
|
||||||
public void updateEntity()
|
|
||||||
{
|
|
||||||
super.updateEntity();
|
|
||||||
|
|
||||||
// TODO: Packet before doing.
|
|
||||||
if (!this.worldObj.isRemote)
|
|
||||||
sendTankUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void refresh()
|
public void refresh()
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Drain block above if it is a fluid.
|
* 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)
|
if (drain != null)
|
||||||
fill(ForgeDirection.UP, drain, true);
|
{
|
||||||
|
if (fill(ForgeDirection.UP, drain, true) > 0)
|
||||||
|
FluidUtility.drainBlock(worldObj, drainPos, true);
|
||||||
|
}
|
||||||
|
|
||||||
super.refresh();
|
super.refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue