This commit is contained in:
raoulvdberge
2018-06-07 12:02:36 +02:00
parent 44a0a2291d
commit 5826d02957

View File

@@ -21,7 +21,11 @@ public class StackListFluid implements IStackList<FluidStack> {
for (FluidStack otherStack : stacks.get(stack.getFluid())) {
if (stack.isFluidEqual(otherStack)) {
otherStack.amount += size;
if ((long) otherStack.amount + (long) size > Integer.MAX_VALUE) {
otherStack.amount = Integer.MAX_VALUE;
} else {
otherStack.amount += size;
}
return;
}