aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-09-14 05:44:48 +0300
committerSHsuperCM <shsupercm@gmail.com>2021-09-14 05:44:48 +0300
commit863b84db346770fc36847ffa0a71e44679fc6bea (patch)
tree67d8a07419088aad83f6bd0b9f16f5e08ff9f9ef /src/main/java/shcm
parent7ffce90fc701a653c50d857316b57f989552ea07 (diff)
downloadCITResewn-863b84db346770fc36847ffa0a71e44679fc6bea.tar.gz
CITResewn-863b84db346770fc36847ffa0a71e44679fc6bea.tar.bz2
CITResewn-863b84db346770fc36847ffa0a71e44679fc6bea.zip
Fixed absolute paths not working when set from resourcepack root
Fixes #20
Diffstat (limited to 'src/main/java/shcm')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java7
1 files changed, 7 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 3e8fca0..e306cbe 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
@@ -342,6 +342,13 @@ public abstract class CIT {
pathIdentifier = new Identifier(pathIdentifier.getNamespace(), path);
if (packContains.test(pathIdentifier))
return pathIdentifier;
+ else if (path.startsWith("assets/")) {
+ path = path.substring(7);
+ int sep = path.indexOf('/');
+ pathIdentifier = new Identifier(path.substring(0, sep), path.substring(sep + 1));
+ if (packContains.test(pathIdentifier))
+ return pathIdentifier;
+ }
}
LinkedList<String> pathParts = new LinkedList<>(Arrays.asList(propertyIdentifier.getPath().split("/")));