aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric')
-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;
}