aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRayDeeUx <raydeeux@gmail.com>2022-08-18 21:48:58 -0400
committerRayDeeUx <raydeeux@gmail.com>2022-08-18 21:48:58 -0400
commitffd7bca2cceb4c1bcf1ad0da9d02b3f39d166675 (patch)
tree928b0eae69abecf96478de618fe2666dc32f8604 /src/main
parentd140ca535f23bf121439060751d5b8c210c3ea40 (diff)
downloadSkyblockHud-Death-Defied-ffd7bca2cceb4c1bcf1ad0da9d02b3f39d166675.tar.gz
SkyblockHud-Death-Defied-ffd7bca2cceb4c1bcf1ad0da9d02b3f39d166675.tar.bz2
SkyblockHud-Death-Defied-ffd7bca2cceb4c1bcf1ad0da9d02b3f39d166675.zip
why the fuck did hypixel add commasv1.14.2
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
index 5690ce4..e6ea19a 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
@@ -19,22 +19,22 @@ public class ActionBarParsing {
public static String lastLowActionBar = "";
private static IChatComponent lastLowEditedActionBar = null; //\u1750
- private static final Pattern HealthRegex = Pattern.compile("([0-9]+)/([0-9]+)\u2764");
- // private static final Pattern HealingRegex = Pattern.compile("\\+([0-9]+)[\u2586\u2585\u2584\u2583\u2582\u2581]");
- private static final Pattern DefenseRegex = Pattern.compile("([0-9]+)\u2748 Defense");
- private static final Pattern ManaRegex = Pattern.compile("([0-9]+)/([0-9]+)\u270E Mana");
- private static final Pattern ManaOverflowRegex = Pattern.compile("([0-9]+)/([0-9]+)\u270E ([0-9]+)\u02AC");
- private static final Pattern ManaDecreaseRegex = Pattern.compile("-([0-9]+) Mana \\(");
+ private static final Pattern HealthRegex = Pattern.compile("(([0-9](,[0-9])*)+)/(([0-9](,[0-9])*)+)\u2764");
+ // private static final Pattern HealingRegex = Pattern.compile("\\+(([0-9](,[0-9])*)+)[\u2586\u2585\u2584\u2583\u2582\u2581]");
+ private static final Pattern DefenseRegex = Pattern.compile("(([0-9](,[0-9])*)+)\u2748 Defense");
+ private static final Pattern ManaRegex = Pattern.compile("(([0-9](,[0-9])*)+)/(([0-9](,[0-9])*)+)\u270E Mana");
+ private static final Pattern ManaOverflowRegex = Pattern.compile("(([0-9](,[0-9])*)+)/(([0-9](,[0-9])*)+)\u270E (([0-9](,[0-9])*)+)\u02AC");
+ private static final Pattern ManaDecreaseRegex = Pattern.compile("-(([0-9](,[0-9])*)+) Mana \\(");
private static final Pattern DrillFuelRegex = Pattern.compile("([0-9,]+)/([0-9,]+k) Drill Fuel");
private static final Pattern XpGainRegex = Pattern.compile("\\+(\\d*\\.?\\d*) (Farming|Mining|Combat|Foraging|Fishing|Enchanting|Alchemy|Carpentry|Runecrafting|Social) \\((\\d*\\.?\\d*)%\\)");
- // private static final Pattern DominusRegex = Pattern.compile("([0-9]+)\u1750");
+ // private static final Pattern DominusRegex = Pattern.compile("(([0-9](,[0-9])*)+)\u1750");
- private static final Pattern HealthReplaceRegex = Pattern.compile("\u00A7c([0-9]+)/([0-9]+)\u2764");
- // private static final Pattern HealingReplaceRegex = Pattern.compile("\\+\u00A7c([0-9]+)[\u2586\u2585\u2584\u2583\u2582\u2581]");
- private static final Pattern HealthAbsorptionReplaceRegex = Pattern.compile("\u00A76([0-9]+)/([0-9]+)\u2764");
- private static final Pattern DefenseReplaceRegex = Pattern.compile("\u00A7a([0-9]+)\u00A7a\u2748 Defense");
- private static final Pattern ManaReplaceRegex = Pattern.compile("\u00A7b([0-9]+)/([0-9]+)\u270E Mana");
- private static final Pattern ManaOverflowReplaceRegex = Pattern.compile("\u00A7b([0-9]+)/([0-9]+)\u270E \u00A73([0-9]+)\u02AC");
+ private static final Pattern HealthReplaceRegex = Pattern.compile("\u00A7c(([0-9](,[0-9])*)+)/(([0-9](,[0-9])*)+)\u2764");
+ // private static final Pattern HealingReplaceRegex = Pattern.compile("\\+\u00A7c(([0-9](,[0-9])*)+)[\u2586\u2585\u2584\u2583\u2582\u2581]");
+ private static final Pattern HealthAbsorptionReplaceRegex = Pattern.compile("\u00A76(([0-9](,[0-9])*)+)/(([0-9](,[0-9])*)+)\u2764");
+ private static final Pattern DefenseReplaceRegex = Pattern.compile("\u00A7a(([0-9](,[0-9])*)+)\u00A7a\u2748 Defense");
+ private static final Pattern ManaReplaceRegex = Pattern.compile("\u00A7b(([0-9](,[0-9])*)+)/(([0-9](,[0-9])*)+)\u270E Mana");
+ private static final Pattern ManaOverflowReplaceRegex = Pattern.compile("\u00A7b(([0-9](,[0-9])*)+)/(([0-9](,[0-9])*)+)\u270E \u00A73(([0-9](,[0-9])*)+)\u02AC");
private static final Pattern DrillFuelReplaceRegex = Pattern.compile("\u00A72([0-9,]+)/([0-9,]+k) Drill Fuel");
private static int ticksSinceLastPrediction = 0;
@@ -120,19 +120,19 @@ public class ActionBarParsing {
if (healthFound) {
try {
- RPGHud.updateHealth(Integer.parseInt(HealthMatcher.group(1)), Integer.parseInt(HealthMatcher.group(2)));
+ RPGHud.updateHealth(Integer.parseInt(HealthMatcher.group(1).replace(",", "")), Integer.parseInt(HealthMatcher.group(2).replace(",", "")));
} catch (Exception ignored) {}
}
if (defenseFound) {
try {
- RPGHud.updateDefense(Integer.parseInt(DefenseMatcher.group(1)));
+ RPGHud.updateDefense(Integer.parseInt(DefenseMatcher.group(1).replace(",", "")));
} catch (Exception ignored) {}
} else if (!xpFound && !manaUseFound) {
RPGHud.updateDefense(0);
}
if (manaFound) {
try {
- RPGHud.updateMana(Integer.parseInt(ManaMatcher.group(1)), Integer.parseInt(ManaMatcher.group(2)));
+ RPGHud.updateMana(Integer.parseInt(ManaMatcher.group(1).replace(",", "")), Integer.parseInt(ManaMatcher.group(2).replace(",", "")));
} catch (Exception ignored) {}
}
// if (dominusFound) {
@@ -141,14 +141,14 @@ public class ActionBarParsing {
// }
if (!manaFound && manaOverflowFound) {
try {
- RPGHud.updateMana(Integer.parseInt(ManaOverflowMatcher.group(1)), Integer.parseInt(ManaOverflowMatcher.group(2)));
- RPGHud.updateOverflow(Integer.parseInt(ManaOverflowMatcher.group(3)));
+ RPGHud.updateMana(Integer.parseInt(ManaOverflowMatcher.group(1).replace(",", "")), Integer.parseInt(ManaOverflowMatcher.group(2).replace(",", "")));
+ RPGHud.updateOverflow(Integer.parseInt(ManaOverflowMatcher.group(3).replace(",", "")));
} catch (Exception ignored) {}
}
if (!manaFound) {
if (manaUseFound) {
try {
- RPGHud.manaPredictionUpdate(false, Integer.parseInt(ManaUseMatcher.group(1)));
+ RPGHud.manaPredictionUpdate(false, Integer.parseInt(ManaUseMatcher.group(1).replace(",", "")));
} catch (Exception ignored) {}
}
RPGHud.manaPredictionUpdate(true, 0);