mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-10-26 14:24:23 +00:00
Fix div by zero (#306)
This commit is contained in:
1 parent
c504dbb28a
commit
3428c86f64
1 file changed
+1
-1
@@ -200,7 +200,7 @@ public class FluidCellInventory implements IFluidCellInventory {
|
||||
|
||||
@Override
|
||||
public long getRemainingFluidTypes() {
|
||||
final long basedOnStorage = this.getFreeBytes() / this.getBytesPerType();
|
||||
final long basedOnStorage = this.getFreeBytes() / Math.max(1, this.getBytesPerType());
|
||||
final long baseOnTotal = this.getTotalFluidTypes() - this.getStoredFluidTypes();
|
||||
return Math.min(basedOnStorage, baseOnTotal);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user