Fixed #676 - "The Exporter in fluid mode crashes"

This commit is contained in:
Raoul Van den Berge
2016-11-26 09:11:09 +01:00
parent 83ef43addb
commit b5965b60d9
4 changed files with 13 additions and 5 deletions

View File

@@ -1,5 +1,8 @@
# Refined Storage Changelog
### 1.2.6
- Fixed crash with exporters in fluid mode (raoulvdberge)
### 1.2.5
- The Constructor can now place fireworks (raoulvdberge)
- Added "View Recipes" JEI toggle in Solderer (way2muchnoise)

View File

@@ -24,7 +24,7 @@ public class FluidGridHandler implements IFluidGridHandler {
public void onExtract(int hash, boolean shift, EntityPlayerMP player) {
FluidStack stack = network.getFluidStorageCache().getList().get(hash);
if (stack == null || stack.amount < 1000) {
if (stack == null || stack.amount < Fluid.BUCKET_VOLUME) {
return;
}

View File

@@ -128,7 +128,7 @@ public class TileConstructor extends TileMultipartNode implements IComparable, I
} else if (type == IType.FLUIDS) {
FluidStack stack = fluidFilters.getFluidStackInSlot(0);
if (stack != null && stack.getFluid().canBePlacedInWorld() && stack.amount >= 1000) {
if (stack != null && stack.getFluid().canBePlacedInWorld() && stack.amount >= Fluid.BUCKET_VOLUME) {
BlockPos front = pos.offset(getDirection());
Block block = stack.getFluid().getBlock();

View File

@@ -92,9 +92,14 @@ public class TileExporter extends TileMultipartNode implements IComparable, ITyp
if (took != null) {
int filled = handler.fill(took, false);
took = network.extractFluid(stack, filled, compare, false);
handler.fill(took, true);
break;
if (filled > 0) {
took = network.extractFluid(stack, filled, compare, false);
handler.fill(took, true);
break;
}
}
}
}