Fix canFill/canDrain in tanks
This commit is contained in:
parent
5be1d6031e
commit
aa24a99d95
1 changed files with 4 additions and 2 deletions
|
@ -248,12 +248,14 @@ public class TileTank extends TileBuildCraft implements IFluidHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||||
return true;
|
Fluid tankFluid = getBottomTank().tank.getFluidType();
|
||||||
|
return tankFluid == null || tankFluid == fluid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||||
return false;
|
Fluid tankFluid = getBottomTank().tank.getFluidType();
|
||||||
|
return tankFluid != null && tankFluid == fluid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFluidLightLevel() {
|
public int getFluidLightLevel() {
|
||||||
|
|
Loading…
Reference in a new issue