Negative power values will be fixed by reloading the map (#335)

This commit is contained in:
Timmeey86
2018-11-15 19:02:17 -05:00
committed by Anuken
parent 930bfb26f4
commit 90e0bf95d1
@@ -28,6 +28,10 @@ public class PowerModule extends BlockModule{
if(Float.isNaN(amount)){
amount = 0f;
}
// Workaround: If power went negative for some reason, at least fix it when reloading the map
if(amount < 0f){
amount = 0f;
}
short amount = stream.readShort();
for(int i = 0; i < amount; i++){