diff options
author | SHsuperCM <shsupercm@gmail.com> | 2021-09-02 18:19:35 +0300 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2021-09-02 18:19:35 +0300 |
commit | ec20dec8b923ac6fa4c794d4ab2242552b8fc2e7 (patch) | |
tree | d4ff47e797a64a813a0c7346806af56602ac9c7d | |
parent | 2f618648c014fc75d3708cc91f8a1663004fc22d (diff) | |
download | CITResewn-ec20dec8b923ac6fa4c794d4ab2242552b8fc2e7.tar.gz CITResewn-ec20dec8b923ac6fa4c794d4ab2242552b8fc2e7.tar.bz2 CITResewn-ec20dec8b923ac6fa4c794d4ab2242552b8fc2e7.zip |
v0.4.4: Fixed literal model paths not loading if "models" prefix is not specified
Fixes #7
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gradle.properties b/gradle.properties index 668c8a5..8541906 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.17.1 yarn_mappings=1.17.1+build.39 loader_version=0.11.6 # Mod Properties -mod_version=0.4.3 +mod_version=0.4.4 maven_group=shcm.shsupercm.fabric archives_base_name=CITResewn diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java index 280e8c1..397f4a6 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java @@ -43,9 +43,15 @@ public class CITItem extends CIT { if (this.items.size() == 0) throw new Exception("CIT must target at least one item type"); - Identifier assetIdentifier = resolvePath(identifier, properties.getProperty("model"), ".json", pack.resourcePack); + String modelProp = properties.getProperty("model"); + Identifier assetIdentifier = resolvePath(identifier, modelProp, ".json", pack.resourcePack); if (assetIdentifier != null) assetIdentifiers.put(null, assetIdentifier); + else if (modelProp != null && !modelProp.startsWith("models")) { + assetIdentifier = resolvePath(identifier, "models/" + modelProp, ".json", pack.resourcePack); + if (assetIdentifier != null) + assetIdentifiers.put(null, assetIdentifier); + } for (Object o : properties.keySet()) if (o instanceof String property && property.startsWith("model.")) { |