diff options
author | SHsuperCM <shsupercm@gmail.com> | 2021-12-20 16:18:04 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2021-12-20 16:18:04 +0200 |
commit | f71f913786a418d896f7024054fa509d5f58aad1 (patch) | |
tree | a80442acc26af8bc150541e73ee28483c4a6eaf4 | |
parent | 2829d8ca46f72ec551a96359bcfc3354204d35ae (diff) | |
download | CITResewn-f71f913786a418d896f7024054fa509d5f58aad1.tar.gz CITResewn-f71f913786a418d896f7024054fa509d5f58aad1.tar.bz2 CITResewn-f71f913786a418d896f7024054fa509d5f58aad1.zip |
Fixed invalid namespaces in resourcepacks
Fixes #82
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java index ee97b25..7e5ff5d 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java @@ -59,6 +59,9 @@ public final class CITParser { private CITParser() {} Collection<Identifier> packProperties = new ArrayList<>(); for (String namespace : resourcePack.getNamespaces(ResourceType.CLIENT_RESOURCES)) { + if (!Identifier.isValid(namespace)) + continue; + packProperties.addAll(resourcePack.findResources(ResourceType.CLIENT_RESOURCES, namespace, "citresewn/cit", Integer.MAX_VALUE - 53, s -> s.endsWith(".properties"))); if (resourcePack.contains(ResourceType.CLIENT_RESOURCES, new Identifier(namespace, "citresewn/cit.properties"))) packProperties.add(new Identifier(namespace, "citresewn/cit.properties")); |