aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-12-20 16:18:04 +0200
committerSHsuperCM <shsupercm@gmail.com>2021-12-20 16:18:04 +0200
commitf71f913786a418d896f7024054fa509d5f58aad1 (patch)
treea80442acc26af8bc150541e73ee28483c4a6eaf4 /src
parent2829d8ca46f72ec551a96359bcfc3354204d35ae (diff)
downloadCITResewn-f71f913786a418d896f7024054fa509d5f58aad1.tar.gz
CITResewn-f71f913786a418d896f7024054fa509d5f58aad1.tar.bz2
CITResewn-f71f913786a418d896f7024054fa509d5f58aad1.zip
Fixed invalid namespaces in resourcepacks
Fixes #82
Diffstat (limited to 'src')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java3
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"));