Skip to content

Commit

Permalink
Merge pull request #693 from hilburn/master
Browse files Browse the repository at this point in the history
fixes #692
  • Loading branch information
jakimfett committed Mar 4, 2015
2 parents 26d9b97 + e55c97d commit 53bc9d1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrai
tankUpdate = true;

tank.amount -= drained;
return new FluidStack(tank.fluidID, drained);
if (tank.amount == 0) tank = null;
return new FluidStack(resource.fluidID, drained);
}

@Override
Expand All @@ -351,8 +352,9 @@ public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
tankUpdate = true;

tank.amount -= drained;
FluidStack result = new FluidStack(tank.fluidID, drained);
if (tank.amount==0) tank=null;
return new FluidStack(tank.fluidID, drained);
return result;
}

/**
Expand Down

0 comments on commit 53bc9d1

Please sign in to comment.