Exporter in fluid mode no longer duplicates fluids that are less than 1 bucket, fixes #369
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- Added Disk Manipulator (way2muchnoise)
|
||||
- Added ingame config (way2muchnoise)
|
||||
- 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)
|
||||
- Updated Dutch translation (raoulvdberge)
|
||||
|
||||
### 1.0.4
|
||||
|
||||
@@ -84,10 +84,15 @@ public class TileExporter extends TileMultipartNode implements IComparable, ITyp
|
||||
if (handler != null) {
|
||||
for (FluidStack stack : fluidFilters.getFluids()) {
|
||||
if (stack != null) {
|
||||
FluidStack took = network.extractFluid(stack, Fluid.BUCKET_VOLUME, compare);
|
||||
FluidStack stackInStorage = network.getFluidStorage().get(stack, compare);
|
||||
|
||||
if (stackInStorage != null) {
|
||||
int toExtract = Math.min(Fluid.BUCKET_VOLUME, stackInStorage.amount);
|
||||
|
||||
FluidStack took = network.extractFluid(stack, toExtract, compare);
|
||||
|
||||
if (took != null) {
|
||||
int remainder = Fluid.BUCKET_VOLUME - handler.fill(took, true);
|
||||
int remainder = toExtract - handler.fill(took, true);
|
||||
|
||||
if (remainder > 0) {
|
||||
network.insertFluid(took, remainder, false);
|
||||
@@ -99,6 +104,7 @@ public class TileExporter extends TileMultipartNode implements IComparable, ITyp
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCompare() {
|
||||
|
||||
@@ -22,10 +22,10 @@ public enum RedstoneMode {
|
||||
return world.isBlockPowered(pos);
|
||||
case LOW:
|
||||
return !world.isBlockPowered(pos);
|
||||
}
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void write(NBTTagCompound tag) {
|
||||
tag.setInteger(NBT, ordinal());
|
||||
|
||||
Reference in New Issue
Block a user