From cd9b8536cbdc31461a2c486ade6437f846dd831e Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 15 May 2023 06:03:13 -0400 Subject: [PATCH] Using color instead of int value. --- src/engine/InterestManagement/RealmMap.java | 4 +--- src/engine/util/MapLoader.java | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/engine/InterestManagement/RealmMap.java b/src/engine/InterestManagement/RealmMap.java index a1a037ec..9bb8de96 100644 --- a/src/engine/InterestManagement/RealmMap.java +++ b/src/engine/InterestManagement/RealmMap.java @@ -41,9 +41,7 @@ public enum RealmMap { public static int getRealmIDByColor(Color color) { - int realmID = _rgbToIDMap.get(color); - - return realmID; + return _rgbToIDMap.getOrDefault(color, 0); } diff --git a/src/engine/util/MapLoader.java b/src/engine/util/MapLoader.java index efbbbf46..0c13aa99 100644 --- a/src/engine/util/MapLoader.java +++ b/src/engine/util/MapLoader.java @@ -60,10 +60,9 @@ public enum MapLoader { realmsWritten++; }catch (Exception e){ - continue; + Logger.error("Error while processing realm map" + e); } - } } timeToLoad = System.currentTimeMillis() - timeToLoad;