aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java29
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java28
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java30
3 files changed, 46 insertions, 41 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 9344649f..9cb63a67 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -1727,30 +1727,7 @@ public class NEUEventListener {
}
}
- private static String[] rarityArrC = new String[] {
- EnumChatFormatting.WHITE+EnumChatFormatting.BOLD.toString()+"COMMON",
- EnumChatFormatting.GREEN+EnumChatFormatting.BOLD.toString()+"UNCOMMON",
- EnumChatFormatting.BLUE+EnumChatFormatting.BOLD.toString()+"RARE",
- EnumChatFormatting.DARK_PURPLE+EnumChatFormatting.BOLD.toString()+"EPIC",
- EnumChatFormatting.GOLD+EnumChatFormatting.BOLD.toString()+"LEGENDARY",
- EnumChatFormatting.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"MYTHIC",
- EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"SPECIAL",
- EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"VERY SPECIAL",
- EnumChatFormatting.DARK_RED+EnumChatFormatting.BOLD.toString()+"SUPREME",
- };
- private static final HashMap<String, String> 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("SUPREME", rarityArrC[8]);
- }
private HashSet<String> percentStats = new HashSet<>();
{
@@ -1825,9 +1802,9 @@ public class NEUEventListener {
out:
for (int i = list.tagCount(); i >= 0; i--) {
String line = list.getStringTagAt(i);
- for(int j=0; j<rarityArrC.length; j++) {
+ for(int j=0; j<Utils.rarityArrC.length; j++) {
for(Map.Entry<String, JsonElement> entry : enchantsObj.entrySet()) {
- if(line.contains(rarityArrC[j] + " " + entry.getKey()) || line.contains(rarityArrC[j] + " DUNGEON " + entry.getKey())) {
+ if(line.contains(Utils.rarityArrC[j] + " " + entry.getKey()) || line.contains(Utils.rarityArrC[j] + " DUNGEON " + entry.getKey())) {
allItemEnchs = entry.getValue().getAsJsonArray();
break out;
}
@@ -1906,7 +1883,7 @@ public class NEUEventListener {
JsonElement statsE = reforgeInfo.get("reforgeStats");
- String rarityFormatted = rarityArrMap.getOrDefault(rarity, rarity);
+ String rarityFormatted = Utils.rarityArrMap.getOrDefault(rarity, rarity);
JsonElement reforgeAbilityE = reforgeInfo.get("reforgeAbility");
String reforgeAbility = null;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
index ee83cb28..f5e784a4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java
@@ -172,7 +172,7 @@ public class AccessoryBagOverlay {
int yIndex = 0;
for(Map.Entry<Integer, Integer> entry : talismanCountRarity.descendingMap().entrySet()) {
- String rarityName = rarityArrC[entry.getKey()];
+ String rarityName = Utils.rarityArrC[entry.getKey()];
Utils.renderAlignedString(rarityName, EnumChatFormatting.WHITE.toString()+entry.getValue(), x+5, y+20+11*yIndex, 70);
yIndex++;
}
@@ -887,17 +887,17 @@ public class AccessoryBagOverlay {
// private static String[] rarityArr = new String[] {
// "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME"
// };
- private static String[] rarityArrC = new String[] {
- EnumChatFormatting.WHITE+EnumChatFormatting.BOLD.toString()+"COMMON",
- EnumChatFormatting.GREEN+EnumChatFormatting.BOLD.toString()+"UNCOMMON",
- EnumChatFormatting.BLUE+EnumChatFormatting.BOLD.toString()+"RARE",
- EnumChatFormatting.DARK_PURPLE+EnumChatFormatting.BOLD.toString()+"EPIC",
- EnumChatFormatting.GOLD+EnumChatFormatting.BOLD.toString()+"LEGENDARY",
- EnumChatFormatting.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"MYTHIC",
- EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"SPECIAL",
- EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"VERY SPECIAL",
- EnumChatFormatting.DARK_RED+EnumChatFormatting.BOLD.toString()+"SUPREME",
- };
+// private static String[] rarityArrC = new String[] {
+// EnumChatFormatting.WHITE+EnumChatFormatting.BOLD.toString()+"COMMON",
+// EnumChatFormatting.GREEN+EnumChatFormatting.BOLD.toString()+"UNCOMMON",
+// EnumChatFormatting.BLUE+EnumChatFormatting.BOLD.toString()+"RARE",
+// EnumChatFormatting.DARK_PURPLE+EnumChatFormatting.BOLD.toString()+"EPIC",
+// EnumChatFormatting.GOLD+EnumChatFormatting.BOLD.toString()+"LEGENDARY",
+// EnumChatFormatting.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"MYTHIC",
+// EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"SPECIAL",
+// EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"VERY SPECIAL",
+// EnumChatFormatting.DARK_RED+EnumChatFormatting.BOLD.toString()+"SUPREME",
+// };
public static int checkItemType(ItemStack stack, boolean contains, String... typeMatches) {
NBTTagCompound tag = stack.getTagCompound();
if(tag != null) {
@@ -955,8 +955,8 @@ public class AccessoryBagOverlay {
NBTTagList list = display.getTagList("Lore", 8);
for (int i = list.tagCount(); i >= 0; i--) {
String line = list.getStringTagAt(i);
- for(int j=0; j<rarityArrC.length; j++) {
- if(line.contains(rarityArrC[j])) {
+ for(int j=0; j<Utils.rarityArrC.length; j++) {
+ if(line.contains(Utils.rarityArrC[j])) {
return j;
}
}
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 b796fbe3..7876776b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -470,9 +470,37 @@ public class Utils {
}
public static String[] rarityArr = new String[] {
- "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME"
+ "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME", "DIVINE"
};
+ public static String[] rarityArrC = new String[] {
+ EnumChatFormatting.WHITE+EnumChatFormatting.BOLD.toString()+"COMMON",
+ EnumChatFormatting.GREEN+EnumChatFormatting.BOLD.toString()+"UNCOMMON",
+ EnumChatFormatting.BLUE+EnumChatFormatting.BOLD.toString()+"RARE",
+ EnumChatFormatting.DARK_PURPLE+EnumChatFormatting.BOLD.toString()+"EPIC",
+ EnumChatFormatting.GOLD+EnumChatFormatting.BOLD.toString()+"LEGENDARY",
+ EnumChatFormatting.LIGHT_PURPLE+EnumChatFormatting.BOLD.toString()+"MYTHIC",
+ EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"SPECIAL",
+ EnumChatFormatting.RED+EnumChatFormatting.BOLD.toString()+"VERY SPECIAL",
+ EnumChatFormatting.DARK_RED+EnumChatFormatting.BOLD.toString()+"SUPREME",
+ EnumChatFormatting.AQUA+EnumChatFormatting.BOLD.toString()+"DIVINE",
+
+ };
+ public static final HashMap<String, String> 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("SUPREME", rarityArrC[8]);
+ rarityArrMap.put("DIVINE", rarityArrC[9]);
+
+ }
+
public static String getRarityFromInt(int rarity){
if(rarity < 0|| rarity >= rarityArr.length){ return rarityArr[0]; }
return rarityArr[rarity];