@@ -104,21 +104,21 @@ public static void gatherModelMaterials(ResourceManager manager, Predicate<PackR
104104 }
105105 }
106106 allPackResources .removeIf (pack -> {
107- if (isTrustedPack .test (pack )) {
108- for (String namespace : pack .getNamespaces (PackType .CLIENT_RESOURCES )) {
109- Collection <ResourceLocation > allBlockstates = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "blockstates" , p -> p .getPath ().endsWith (".json" ));
110- for (ResourceLocation blockstate : allBlockstates ) {
111- allAvailableStates .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("blockstates/" , "" ).replace (".json" , "" )));
112- }
113- Collection <ResourceLocation > allModels = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "models" , p -> p .getPath ().endsWith (".json" ));
114- for (ResourceLocation blockstate : allModels ) {
115- allAvailableModels .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("models/" , "" ).replace (".json" , "" )));
116- }
107+ for (String namespace : pack .getNamespaces (PackType .CLIENT_RESOURCES )) {
108+ Collection <ResourceLocation > allBlockstates = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "blockstates" , p -> p .getPath ().endsWith (".json" ));
109+ for (ResourceLocation blockstate : allBlockstates ) {
110+ allAvailableStates .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("blockstates/" , "" ).replace (".json" , "" )));
117111 }
118- return true ;
112+ Collection <ResourceLocation > allModels = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "models" , p -> p .getPath ().endsWith (".json" ));
113+ for (ResourceLocation blockstate : allModels ) {
114+ allAvailableModels .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("models/" , "" ).replace (".json" , "" )));
115+ }
116+ }
117+ if (!isTrustedPack .test (pack )) {
118+ ModernFix .LOGGER .debug ("Pack with class {} needs manual scan" , pack .getClass ().getName ());
119+ return false ;
119120 }
120- ModernFix .LOGGER .debug ("Pack with class {} needs manual scan" , pack .getClass ().getName ());
121- return false ;
121+ return true ;
122122 });
123123
124124 gatherAdditionalViaManualScan (allPackResources , allAvailableStates , blockStateFiles , "blockstates/" );
@@ -206,6 +206,7 @@ public static void gatherModelMaterials(ResourceManager manager, Predicate<PackR
206206 blockStateData = null ;
207207 blockStateLoadedFiles .clear ();
208208
209+ modelFiles .addAll (allAvailableModels );
209210 /* figure out which models we should actually load */
210211 gatherAdditionalViaManualScan (allPackResources , allAvailableModels , modelFiles , "models/" );
211212 modelFiles .retainAll (allAvailableModels );
0 commit comments