Also fix the bug in fluid interface, fixes #369

This commit is contained in:
Raoul Van den Berge
2016-09-20 18:09:58 +02:00
parent 26871e7880
commit 6e63cf368e
2 changed files with 13 additions and 7 deletions

View File

@@ -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

View File

@@ -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);
FluidStack took = network.extractFluid(stack, toExtract, compare);
if (took != null) {
int remainder = toExtract - tankOut.fillInternal(took, true);
if (remainder > 0) {
network.insertFluid(stack, remainder, false);
network.insertFluid(took, remainder, false);
}
}
}
}