diff options
author | SHsuperCM <shsupercm@gmail.com> | 2021-12-31 09:01:33 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2021-12-31 09:01:33 +0200 |
commit | 2faff65ff44deb5042bc95be6926506962775586 (patch) | |
tree | 0d782a4b1e0b80032ecb0b862a4a30e1ecd9e9ce /src/main/java | |
parent | b2b2b889b4094f2b6959021a6652966f7431bee4 (diff) | |
download | CITResewn-2faff65ff44deb5042bc95be6926506962775586.tar.gz CITResewn-2faff65ff44deb5042bc95be6926506962775586.tar.bz2 CITResewn-2faff65ff44deb5042bc95be6926506962775586.zip |
Hotfix for leather armor color not accepting hex matches
Fixes #85
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java | 5 |
1 files changed, 5 insertions, 0 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 7b6acde..a58c946 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 @@ -183,6 +183,11 @@ public abstract class CIT { final Pattern pattern = Pattern.compile(matchProperty); match = s -> pattern.matcher(caseSensitive ? s : s.toLowerCase()).matches(); } else { + if (property.equals("nbt.display.color") && matchProperty.startsWith("#")) + try { + matchProperty = String.valueOf(Integer.parseInt(matchProperty.substring(1).toLowerCase(Locale.ENGLISH), 16)); + } catch (Exception ignored) { } + final String pattern = matchProperty; match = s -> s.equals(pattern); } |