From 2f45ca5175ea1a42afc8cc9f58a86af8abe45a8c Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Sat, 18 Sep 2021 16:51:19 +0300 Subject: Fixed nbt property's regex matching not working --- src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/shcm/shsupercm/fabric') 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); -- cgit