aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/playerstats
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-07-07 21:52:37 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-07-07 21:52:37 -0230
commit36a66e436ef3c5a3aa2deda0e1538db072ca7f71 (patch)
tree32a3a104464da3ef8ee743ecfe241d1320ad25c9 /src/main/java/com/thatgravyboat/skyblockhud/playerstats
parent93248d28d6b314b42f6b0d82164975343b214ece (diff)
downloadSkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.tar.gz
SkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.tar.bz2
SkyblockHud-Death-Defied-36a66e436ef3c5a3aa2deda0e1538db072ca7f71.zip
Added Alpha Crystal Hollows locations to get ahead of the update and added commands for people to help me with deving.
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/playerstats')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
index 4e895f9..5340fad 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/playerstats/ActionBarParsing.java
@@ -3,8 +3,6 @@ package com.thatgravyboat.skyblockhud.playerstats;
import com.thatgravyboat.skyblockhud.SkyblockHud;
import com.thatgravyboat.skyblockhud.Utils;
import com.thatgravyboat.skyblockhud.overlay.RPGHud;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
@@ -12,10 +10,13 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
public class ActionBarParsing {
private static String lastActionBar = "";
- private static String lastLowActionBar = "";
+ public static String lastLowActionBar = "";
private static IChatComponent lastLowEditedActionBar = null;
private static final Pattern HealthRegex = Pattern.compile("([0-9]+)/([0-9]+)\u2764");
@@ -64,7 +65,10 @@ public class ActionBarParsing {
message = HealthAbsorptionReplaceRegex.matcher(message).replaceAll("");
message = DefenseReplaceRegex.matcher(message).replaceAll("");
message = ManaReplaceRegex.matcher(message).replaceAll("");
- message = ManaOverflowReplaceRegex.matcher(message).replaceAll("");
+ Matcher overflowMatcher = ManaOverflowReplaceRegex.matcher(message);
+ if (overflowMatcher.find()){
+ message = overflowMatcher.replaceAll("\u00A73\u02AC " + overflowMatcher.group(3));
+ }
lastLowEditedActionBar = new ChatComponentText(message.trim());
}