Fixed Fluid Interface with Stack Upgrade not exporting liquids, fixes #1536

This commit is contained in:
raoulvdberge
2017-11-13 22:50:38 +01:00
parent 0905f2fb90
commit 6e7471eaab
2 changed files with 9 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
### 1.5.23 ### 1.5.23
- Fixed duplication bug with autocrafting (raoulvdberge) - Fixed duplication bug with autocrafting (raoulvdberge)
- Fixed Fluid Interface with Stack Upgrade not exporting liquids (raoulvdberge)
### 1.5.22 ### 1.5.22
- Added oredict, blocking, processing, ore inputs access to OpenComputers API (raoulvdberge) - Added oredict, blocking, processing, ore inputs access to OpenComputers API (raoulvdberge)

View File

@@ -120,6 +120,14 @@ public class NetworkNodeFluidInterface extends NetworkNode implements IComparabl
if (stackInStorage != null) { if (stackInStorage != null) {
int toExtract = Math.min(Fluid.BUCKET_VOLUME * upgrades.getItemInteractCount(), stackInStorage.amount); int toExtract = Math.min(Fluid.BUCKET_VOLUME * upgrades.getItemInteractCount(), stackInStorage.amount);
int spaceRemaining = tankOut.getCapacity() - tankOut.getFluidAmount();
if (toExtract > spaceRemaining) {
toExtract = spaceRemaining;
}
if (toExtract <= 0) {
return;
}
FluidStack took = network.extractFluid(stack, toExtract, compare, true); FluidStack took = network.extractFluid(stack, toExtract, compare, true);
if (took != null && (toExtract - tankOut.fillInternal(took, false)) == 0) { if (took != null && (toExtract - tankOut.fillInternal(took, false)) == 0) {