diff options
author | SHsuperCM <shsupercm@gmail.com> | 2021-09-18 16:51:19 +0300 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2021-09-18 16:51:19 +0300 |
commit | 2f45ca5175ea1a42afc8cc9f58a86af8abe45a8c (patch) | |
tree | 6987dacdec19fdd03ee3e6462069905570c27dde /src/main | |
parent | b3dd941dbed08e387876aa1b3fe779c0b7f50b83 (diff) | |
download | CITResewn-2f45ca5175ea1a42afc8cc9f58a86af8abe45a8c.tar.gz CITResewn-2f45ca5175ea1a42afc8cc9f58a86af8abe45a8c.tar.bz2 CITResewn-2f45ca5175ea1a42afc8cc9f58a86af8abe45a8c.zip |
Fixed nbt property's regex matching not working
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java index 3675900..1492d4f 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java @@ -181,7 +181,7 @@ public abstract class CIT { final String pattern = matchProperty; match = s -> matchesPattern(caseSensitive ? s : s.toLowerCase(), pattern, 0, s.length(), 0, pattern.length()); } else if (matchProperty.startsWith(caseSensitive ? "regex:" : "iregex:")) { - matchProperty = caseSensitive ? matchProperty.substring(5) : matchProperty.substring(6).toLowerCase(Locale.ENGLISH); + matchProperty = caseSensitive ? matchProperty.substring(6) : matchProperty.substring(7).toLowerCase(Locale.ENGLISH); if ((path[path.length - 1].equals("Name") || path[path.length - 1].equals("Lore")) && !matchProperty.startsWith("{")) matchProperty = "\\{\"text\":\"" + matchProperty + "\"}"; final Pattern pattern = Pattern.compile(matchProperty); |