SteamWar/BauSystem2.0
Archiviert
12
0
Dieser Commit ist enthalten in:
yoyosource 2021-05-02 12:21:36 +02:00
Ursprung 7c5cd834a5
Commit 3276094714

Datei anzeigen

@ -44,9 +44,9 @@ public class RamUsage implements Listener {
long presumableFreeMemory = Runtime.getRuntime().maxMemory() - allocatedMemory; long presumableFreeMemory = Runtime.getRuntime().maxMemory() - allocatedMemory;
double percentageFree = presumableFreeMemory / (double) Runtime.getRuntime().maxMemory(); double percentageFree = presumableFreeMemory / (double) Runtime.getRuntime().maxMemory();
bossBar.setProgress(1 - percentageFree); bossBar.setProgress(1 - percentageFree);
if (mode && percentageFree > 0.75) { if (mode && percentageFree > 0.6) {
mode = false; mode = false;
} else if (!mode && percentageFree < 0.6) { } else if (!mode && percentageFree < 0.4) {
mode = true; mode = true;
} }
if (mode) { if (mode) {