mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Partial fix for #5576. Stopped it from overflowing though at some point the EnergyNetwork should still be updated to having capacity be a double.
This commit is contained in:
1 file changed
+3
-1
@@ -255,7 +255,9 @@ public abstract class DynamicNetwork<ACCEPTOR, NETWORK extends DynamicNetwork<AC
|
||||
|
||||
public synchronized void updateCapacity() {
|
||||
updateMeanCapacity();
|
||||
capacity = (int) meanCapacity * transmitters.size();
|
||||
double newCapacity = meanCapacity * transmitters.size();
|
||||
//TODO: Make EnergyNetwork use doubles for capacity rather than just integers
|
||||
capacity = newCapacity > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) newCapacity;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user