}
boolean res = super.doPull(dir);
if(tank.getFluidAmount() < tank.getCapacity()) {
BlockCoord loc = getLocation().getLocation(dir);
IFluidHandler target = FluidUtil.getFluidHandler(worldObj, loc);
if(target != null) {
if(tank.getFluidAmount() > 0) {
FluidStack canPull = tank.getFluid().copy();
canPull.amount = tank.getCapacity() - tank.getFluidAmount();
canPull.amount = Math.min(canPull.amount, IO_MB_TICK);
FluidStack drained = target.drain(dir.getOpposite(), canPull, true);
if(drained != null && drained.amount > 0) {
tank.fill(drained, true);
tankDirty = true;
return res;
}
} else {
FluidTankInfo[] infos = target.getTankInfo(dir.getOpposite());
if(infos != null) {
for (FluidTankInfo info : infos) {
if(info.fluid != null && info.fluid.amount > 0) {
if(canFill(dir, info.fluid.getFluid())) {
FluidStack canPull = info.fluid.copy();
canPull.amount = Math.min(IO_MB_TICK, canPull.amount);
FluidStack drained = target.drain(dir.getOpposite(), canPull, true);
if(drained != null && drained.amount > 0) {
tank.fill(drained, true);
tankDirty = true;
return res;
}