diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2024-08-12 21:14:53 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-12 21:14:53 +1000 |
| commit | 5850777d33722a95ca49cf057f7308ca565d4c21 (patch) | |
| tree | fbf465465887b86e87061555b16d09077a892ffc | |
| parent | a5112c0fe80ef77b15ff52651df45cb80e0ec803 (diff) | |
| download | notenoughupdates-5850777d33722a95ca49cf057f7308ca565d4c21.tar.gz notenoughupdates-5850777d33722a95ca49cf057f7308ca565d4c21.tar.bz2 notenoughupdates-5850777d33722a95ca49cf057f7308ca565d4c21.zip | |
Fix Damage Indicator Style not working with special symbols (#1314)
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java index d8f7becd..87afab30 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java @@ -47,7 +47,8 @@ public class DamageCommas { private static final char OVERLOAD_STAR = '\u272F'; private static final Pattern PATTERN_CRIT = Pattern.compile( "\u00a7f" + STAR + "((?:\u00a7.\\d(?:§.,)?)+)\u00a7." + STAR + "(.*)"); - private static final Pattern PATTERN_NO_CRIT = Pattern.compile("(\u00a7.)([\\d+,]*)(.*)"); + private static final String SPECIAL = "[⚔+✧❤♞☄✷ﬗ✯]*"; //Stolen from skytils + private static final Pattern PATTERN_NO_CRIT = Pattern.compile("(\u00a7.)([\\d+,]*)(.*)" + SPECIAL); private static final Pattern OVERLOAD_PATTERN = Pattern.compile("(\u00a7.)" + OVERLOAD_STAR + "((?:\u00a7.[\\d,])+)(\u00a7.)" + OVERLOAD_STAR + "\u00a7r"); public static IChatComponent replaceName(EntityLivingBase entity) { |
