From ea3ec354ba3bb5b4ac64b8032816b8e4c407f099 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Tue, 28 Dec 2021 00:49:28 -0500 Subject: more code clean up (#38) --- .../moulberry/notenoughupdates/util/Utils.java | 29 +++++++++------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index b965c0c4..f34ba230 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -50,7 +50,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class Utils { - public static boolean hasEffectOverride = false; public static boolean disableCustomDungColours = false; private static final LinkedList guiScales = new LinkedList<>(); @@ -473,21 +472,18 @@ public class Utils { //EnumChatFormatting.AQUA+EnumChatFormatting.BOLD.toString()+"DIVINE", }; - public static final HashMap rarityArrMap = new HashMap<>(); - - static { - rarityArrMap.put("COMMON", rarityArrC[0]); - rarityArrMap.put("UNCOMMON", rarityArrC[1]); - rarityArrMap.put("RARE", rarityArrC[2]); - rarityArrMap.put("EPIC", rarityArrC[3]); - rarityArrMap.put("LEGENDARY", rarityArrC[4]); - rarityArrMap.put("MYTHIC", rarityArrC[5]); - rarityArrMap.put("SPECIAL", rarityArrC[6]); - rarityArrMap.put("VERY SPECIAL", rarityArrC[7]); - rarityArrMap.put("DIVINE", rarityArrC[8]); - //rarityArrMap.put("DIVINE", rarityArrC[9]); - - } + public static final HashMap rarityArrMap = new HashMap() {{ + put("COMMON", rarityArrC[0]); + put("UNCOMMON", rarityArrC[1]); + put("RARE", rarityArrC[2]); + put("EPIC", rarityArrC[3]); + put("LEGENDARY", rarityArrC[4]); + put("MYTHIC", rarityArrC[5]); + put("SPECIAL", rarityArrC[6]); + put("VERY SPECIAL", rarityArrC[7]); + put("DIVINE", rarityArrC[8]); + // put("DIVINE", rarityArrC[9]); + }}; public static String getRarityFromInt(int rarity) { if (rarity < 0 || rarity >= rarityArr.length) { @@ -1355,5 +1351,4 @@ public class Utils { return endsIn; } - } -- cgit