diff --git a/CHANGELOG.md b/CHANGELOG.md index a0bf39d7b..580c7cd23 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ - Added support for ore dictionary substitutions in Crafting Patterns (raoulvdberge) - Added Disk Manipulator (way2muchnoise) - Added ingame config (way2muchnoise) -- Added the ability to see the output of a Pattern by shift clicking (raoulvdberge) +- Added the ability to see the output of a Pattern by holding shift (raoulvdberge) - When a machine is in use by a crafting pattern, inserting of items from other patterns will be avoided (raoulvdberge) -- Exporter in fluid mode no longer duplicates fluids that are less than 1 bucket (raoulvdberge) +- Exporter in fluid mode and Fluid Interface no longer duplicates fluids that are less than 1 bucket (raoulvdberge) - Updated Dutch translation (raoulvdberge) ### 1.0.4 diff --git a/src/main/java/refinedstorage/tile/TileFluidInterface.java b/src/main/java/refinedstorage/tile/TileFluidInterface.java index 40937004e..96d2db1c2 100755 --- a/src/main/java/refinedstorage/tile/TileFluidInterface.java +++ b/src/main/java/refinedstorage/tile/TileFluidInterface.java @@ -119,13 +119,19 @@ public class TileFluidInterface extends TileNode implements IComparable { network.insertFluid(remainder, remainder.amount, false); } } else if (stack != null) { - FluidStack result = network.extractFluid(stack, Fluid.BUCKET_VOLUME, compare); + FluidStack stackInStorage = network.getFluidStorage().get(stack, compare); - if (result != null) { - int remainder = Fluid.BUCKET_VOLUME - tankOut.fillInternal(result, true); + if (stackInStorage != null) { + int toExtract = Math.min(Fluid.BUCKET_VOLUME, stackInStorage.amount); - if (remainder > 0) { - network.insertFluid(stack, remainder, false); + FluidStack took = network.extractFluid(stack, toExtract, compare); + + if (took != null) { + int remainder = toExtract - tankOut.fillInternal(took, true); + + if (remainder > 0) { + network.insertFluid(took, remainder, false); + } } } }