From 1c166d10d7302095412e03c1be2b08e117993da9 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 2 May 2021 18:26:53 +0200 Subject: [PATCH] Optimize RamUsage --- .../src/de/steamwar/bausystem/features/world/RamUsage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/world/RamUsage.java b/BauSystem_Main/src/de/steamwar/bausystem/features/world/RamUsage.java index 56ceab69..6a525271 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/world/RamUsage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/world/RamUsage.java @@ -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) {