From aa24a99d956606b5efdb1da51548fd5d35f1e92f Mon Sep 17 00:00:00 2001 From: Prototik Date: Wed, 21 May 2014 13:29:17 +0800 Subject: [PATCH] Fix canFill/canDrain in tanks --- common/buildcraft/factory/TileTank.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index 337ba3a5..2ade930f 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -248,12 +248,14 @@ public class TileTank extends TileBuildCraft implements IFluidHandler { @Override public boolean canFill(ForgeDirection from, Fluid fluid) { - return true; + Fluid tankFluid = getBottomTank().tank.getFluidType(); + return tankFluid == null || tankFluid == fluid; } @Override public boolean canDrain(ForgeDirection from, Fluid fluid) { - return false; + Fluid tankFluid = getBottomTank().tank.getFluidType(); + return tankFluid != null && tankFluid == fluid; } public int getFluidLightLevel() {