aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
diff options
context:
space:
mode:
authornopothegamer <40329022+nopothegamer@users.noreply.github.com>2021-11-02 21:22:31 +1100
committerGitHub <noreply@github.com>2021-11-02 06:22:31 -0400
commit98c9718a3d54a74e7700f4015d2624948bd6df0c (patch)
treee2de362007fedba198561b90ade3f9ba8fc3eb8b /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
parent7c00af18febf6c0b833c7633b4fb60a9a1bb93af (diff)
downloadnotenoughupdates-98c9718a3d54a74e7700f4015d2624948bd6df0c.tar.gz
notenoughupdates-98c9718a3d54a74e7700f4015d2624948bd6df0c.tar.bz2
notenoughupdates-98c9718a3d54a74e7700f4015d2624948bd6df0c.zip
Adding skill overlays and hotm stuff in pv + other minor stuff (#15)
* idk where im commiting to * idk where im commiting to * made tita overlay and waypoints work with dwarven overlay off "fixed" divan rarity in neuah made eitherwarp block overlay turn off able * Added change notes * i stopped being pepega and worked out how neu config works * Added mining skill overlay * fixed mining overlay * add option to hide Mining waypoints in Dwarven mines when at location * better check location * Make cata xp in /pv be calculated on how many runs you have * Added master cata xp rates * Make gitignore not show as changed * Added warnings to some things in /neu * maybe fix hiding waypoints * Added a fishing skill overlay its kinda scuffed because of the interp stuff * Hopefully fix Rampart's quarry (for real now) * Moul said i could no one leak in general or smth * Cache itemstacks in miningoverlay and crystalhollows overlay (untested) * Fix preinit crash due to manager not existing yet * Make tab do the same as down button while in tab completion mode * remove debug print * Added pitch to farming overlay * Changed the panoramas back to the old one because ery is scuffed * isnt finished but should work for ery * Made it so if ur mining 60 it just says maxed level instead of b u g * Made skills not show int limit when at max level in skill overlays * wh :omegalul: made neu * sad you cant type that long in search bar * Hello don't mind me just improving your workflow * æ * Oh also this * Added the cata xp scaling(idk if m3 and 4 values are right) * Added Expertise Progress * Fix farming overlay * Added cult/crops to next cult level * Go to the other end of the tab-completion List when hitting the end * remove debug prints * added combat skill overlay and some changes to the others (combat doesnt work rn could someone look into it :prayge:) * Added cooldown to god pot showing in todo overlay * comment * Added option to remove enchant glint in storage gui * Added option to remove enchant glint in storage gui * please fix * please fix * Fixed the placement of help.png * Added fairy soul waypoints to misc * unclear not clear * Added dg partner cape * fix space cape * Fix space cape * Make it so you can hold down keys in sign GUIs * Added a button in storage menu to open the settings Added an option to change the click names for /pv to /ah * Made it so ur config doesnt reset * Added bhop (shhh dont tell anyone) * Added a help menu to /neuec * changed fisgifis overlay button no work * make working fishing tiemr * jani can you test this out for us * Added a gui locations tab * very important feature * Fixed wart hoe overlay if not alch 50 * Make it so the ding time is customizable * Added coins/m to farming overlay * Basic mining tab in pv * Just for jani * Just for jani v2 * works ig * my balls * hotm pv is mostly done missing some perks * hotm pv done * message goes here * push so i can pr jani * Final hotm pv texture + fix m3 and m4 cata xp * edit: didnt work * fixed up stuff dokm said * added image for hotm pv * Fixed previews for furf and dg capes * removed combat overlay from location gui menu in /neu * Start of a custom pv page * Removed custom pv because -2 people would use it Removed neubhop (found out bhop is bannable) * update build gradle Co-authored-by: Lulonaut <lulonaut@tutanota.de> Co-authored-by: Lulonaut <67191924+Lulonaut@users.noreply.github.com> Co-authored-by: DoKM <mcazzyman@gmail.com> Co-authored-by: TymanWasTaken <tyman@tyman.tech> Co-authored-by: MicrocontrollersDev <microcontrollersyt@gmail.com> Co-authored-by: jani270 <jani270@gmx.de>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java39
1 files changed, 24 insertions, 15 deletions
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 0845c7f6..b965c0c4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java
@@ -455,21 +455,22 @@ public class Utils {
return str.substring(0, 1).toUpperCase() + str.substring(1).toLowerCase();
}
- public static String[] rarityArr = new String[]{
- "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME", "DIVINE"
+ public static String[] rarityArr = new String[] {
+ "COMMON", "UNCOMMON", "RARE", "EPIC", "LEGENDARY", "MYTHIC", "SPECIAL", "VERY SPECIAL", "SUPREME", "^^ THAT ONE IS DIVINE ^^"//, "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 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.AQUA+EnumChatFormatting.BOLD.toString()+"DIVINE",
+ EnumChatFormatting.AQUA+EnumChatFormatting.BOLD.toString()+"DIVINE",
+ //EnumChatFormatting.AQUA+EnumChatFormatting.BOLD.toString()+"DIVINE",
};
public static final HashMap<String, String> rarityArrMap = new HashMap<>();
@@ -483,8 +484,8 @@ public class Utils {
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]);
+ rarityArrMap.put("DIVINE", rarityArrC[8]);
+ //rarityArrMap.put("DIVINE", rarityArrC[9]);
}
@@ -1033,6 +1034,14 @@ public class Utils {
return prim.getAsFloat();
}
+ public static int getElementAsInt(JsonElement element, int def) {
+ if (element == null) return def;
+ if (!element.isJsonPrimitive()) return def;
+ JsonPrimitive prim = element.getAsJsonPrimitive();
+ if (!prim.isNumber()) return def;
+ return prim.getAsInt();
+ }
+
public static String getElementAsString(JsonElement element, String def) {
if (element == null) return def;
if (!element.isJsonPrimitive()) return def;