SteamWar/BauSystem2.0
Archiviert
12
0

Optimize RamUsage

Dieser Commit ist enthalten in:
yoyosource 2021-05-02 18:26:53 +02:00
Ursprung 22b7a3f89d
Commit 1c166d10d7

Datei anzeigen

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