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 Disk Manipulator (way2muchnoise)
|
||||||
- Added ingame config (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)
|
- 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)
|
- Updated Dutch translation (raoulvdberge)
|
||||||
|
|
||||||
### 1.0.4
|
### 1.0.4
|
||||||
|
|||||||
@@ -84,13 +84,19 @@ public class TileExporter extends TileMultipartNode implements IComparable, ITyp
|
|||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
for (FluidStack stack : fluidFilters.getFluids()) {
|
for (FluidStack stack : fluidFilters.getFluids()) {
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
FluidStack took = network.extractFluid(stack, Fluid.BUCKET_VOLUME, compare);
|
FluidStack stackInStorage = network.getFluidStorage().get(stack, compare);
|
||||||
|
|
||||||
if (took != null) {
|
if (stackInStorage != null) {
|
||||||
int remainder = Fluid.BUCKET_VOLUME - handler.fill(took, true);
|
int toExtract = Math.min(Fluid.BUCKET_VOLUME, stackInStorage.amount);
|
||||||
|
|
||||||
if (remainder > 0) {
|
FluidStack took = network.extractFluid(stack, toExtract, compare);
|
||||||
network.insertFluid(took, remainder, false);
|
|
||||||
|
if (took != null) {
|
||||||
|
int remainder = toExtract - handler.fill(took, true);
|
||||||
|
|
||||||
|
if (remainder > 0) {
|
||||||
|
network.insertFluid(took, remainder, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ public enum RedstoneMode {
|
|||||||
return world.isBlockPowered(pos);
|
return world.isBlockPowered(pos);
|
||||||
case LOW:
|
case LOW:
|
||||||
return !world.isBlockPowered(pos);
|
return !world.isBlockPowered(pos);
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void write(NBTTagCompound tag) {
|
public void write(NBTTagCompound tag) {
|
||||||
|
|||||||
Reference in New Issue
Block a user