aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn/pack
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-12-31 09:01:33 +0200
committerSHsuperCM <shsupercm@gmail.com>2021-12-31 09:01:33 +0200
commit2faff65ff44deb5042bc95be6926506962775586 (patch)
tree0d782a4b1e0b80032ecb0b862a4a30e1ecd9e9ce /src/main/java/shcm/shsupercm/fabric/citresewn/pack
parentb2b2b889b4094f2b6959021a6652966f7431bee4 (diff)
downloadCITResewn-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/shcm/shsupercm/fabric/citresewn/pack')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java5
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);
}