From 5958e10effdd40f90f7d49dd65f2b1970edfe9d7 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Fri, 21 Apr 2023 13:40:21 -0400 Subject: [PATCH] Fix behavior for contained paths with non-vanilla PackTypes --- .../mixin/perf/resourcepacks/ModFileResourcePackMixin.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/embeddedt/modernfix/mixin/perf/resourcepacks/ModFileResourcePackMixin.java b/src/main/java/org/embeddedt/modernfix/mixin/perf/resourcepacks/ModFileResourcePackMixin.java index daabe881..cd8a862e 100644 --- a/src/main/java/org/embeddedt/modernfix/mixin/perf/resourcepacks/ModFileResourcePackMixin.java +++ b/src/main/java/org/embeddedt/modernfix/mixin/perf/resourcepacks/ModFileResourcePackMixin.java @@ -56,9 +56,7 @@ public abstract class ModFileResourcePackMixin { this.rootListingByNamespaceAndType = new EnumMap<>(PackType.class); this.containedPaths = new HashSet<>(); for(PackType type : PackType.values()) { - if(!PackTypeHelper.isVanillaPackType(type)) - continue; - Set namespaces = this.namespacesByType.get(type); + Set namespaces = PackTypeHelper.isVanillaPackType(type) ? this.namespacesByType.get(type) : this.getNamespaces(type); HashMap> rootListingForNamespaces = new HashMap<>(); for(String namespace : namespaces) { try { @@ -82,7 +80,8 @@ public abstract class ModFileResourcePackMixin { rootListingForNamespaces.put(namespace, Collections.emptyList()); } } - this.rootListingByNamespaceAndType.put(type, rootListingForNamespaces); + if(PackTypeHelper.isVanillaPackType(type)) + this.rootListingByNamespaceAndType.put(type, rootListingForNamespaces); } }