aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-09-14 05:33:12 +0300
committerSHsuperCM <shsupercm@gmail.com>2021-09-14 05:33:12 +0300
commit7ffce90fc701a653c50d857316b57f989552ea07 (patch)
treecb67f446569011e2b59c8a20b27bcc29ca865144 /src/main/java/shcm
parent87e4e3cdbab3c0da7dedd1c8254e992619304f23 (diff)
downloadCITResewn-7ffce90fc701a653c50d857316b57f989552ea07.tar.gz
CITResewn-7ffce90fc701a653c50d857316b57f989552ea07.tar.bz2
CITResewn-7ffce90fc701a653c50d857316b57f989552ea07.zip
Fixed empty asset resolution ignoring double extension
Diffstat (limited to 'src/main/java/shcm')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java5
1 files changed, 4 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 98e94f6..3e8fca0 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
@@ -323,7 +323,10 @@ public abstract class CIT {
*/
public static Identifier resolvePath(Identifier propertyIdentifier, String path, String extension, Predicate<Identifier> packContains) {
if (path == null) {
- Identifier pathIdentifier = new Identifier(propertyIdentifier.getNamespace(), propertyIdentifier.getPath().replace(".properties", extension));
+ path = propertyIdentifier.getPath().substring(0, propertyIdentifier.getPath().length() - 11);
+ if (!path.endsWith(extension))
+ path = path + extension;
+ Identifier pathIdentifier = new Identifier(propertyIdentifier.getNamespace(), path);
return packContains.test(pathIdentifier) ? pathIdentifier : null;
}