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 /src/main/java/shcm/shsupercm/fabric | |
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
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java | 8 |
1 files changed, 7 insertions, 1 deletions
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.")) { |