diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-02-15 12:31:42 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-02-15 12:31:42 +0200 |
commit | 4d8c7ea53d5f4af351ec9355c55931ad4dad6715 (patch) | |
tree | 88105551cd2d8c8d5ee935d52ba60f324711d25d /src/main/java/shcm/shsupercm/fabric/citresewn/pack/PackParser.java | |
parent | 972e6c330d03f205ab738ed28c4e47496f30e92d (diff) | |
download | CITResewn-4d8c7ea53d5f4af351ec9355c55931ad4dad6715.tar.gz CITResewn-4d8c7ea53d5f4af351ec9355c55931ad4dad6715.tar.bz2 CITResewn-4d8c7ea53d5f4af351ec9355c55931ad4dad6715.zip |
Pass resource manager to type loading
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/pack/PackParser.java')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/PackParser.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/PackParser.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/PackParser.java index 1dbc22d..38ca718 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/PackParser.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/PackParser.java @@ -65,7 +65,7 @@ public class PackParser { for (Identifier identifier : resourceManager.findResources(root + "/cit", s -> s.endsWith(".properties"))) { String packName = null; try (Resource resource = resourceManager.getResource(identifier)) { - cits.add(parseCIT(PropertyGroup.tryParseGroup(packName = resource.getResourcePackName(), identifier, resource.getInputStream()))); + cits.add(parseCIT(PropertyGroup.tryParseGroup(packName = resource.getResourcePackName(), identifier, resource.getInputStream()), resourceManager)); } catch (CITParsingException e) { CITResewn.logErrorLoading(e.getMessage()); } catch (Exception e) { @@ -77,7 +77,7 @@ public class PackParser { return cits; } - public static CIT<?> parseCIT(PropertyGroup properties) throws CITParsingException { + public static CIT<?> parseCIT(PropertyGroup properties, ResourceManager resourceManager) throws CITParsingException { CITType citType = CITRegistry.parseType(properties); ArrayList<CITCondition> conditions = new ArrayList<>(); @@ -109,7 +109,7 @@ public class PackParser { return condition == null; }); - citType.load(conditions, properties); + citType.load(conditions, properties, resourceManager); return new CIT<>(properties.identifier, properties.packName, citType, conditions.toArray(new CITCondition[0]), weight.weight); } |