@@ -105,21 +105,21 @@ public static void gatherModelMaterials(ResourceManager manager, Predicate<PackR
105105 }
106106 }
107107 allPackResources .removeIf (pack -> {
108- if (isTrustedPack .test (pack )) {
109- for (String namespace : pack .getNamespaces (PackType .CLIENT_RESOURCES )) {
110- Collection <ResourceLocation > allBlockstates = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "blockstates" , Integer .MAX_VALUE , p -> p .endsWith (".json" ));
111- for (ResourceLocation blockstate : allBlockstates ) {
112- allAvailableStates .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("blockstates/" , "" ).replace (".json" , "" )));
113- }
114- Collection <ResourceLocation > allModels = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "models" , Integer .MAX_VALUE , p -> p .endsWith (".json" ));
115- for (ResourceLocation blockstate : allModels ) {
116- allAvailableModels .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("models/" , "" ).replace (".json" , "" )));
117- }
108+ for (String namespace : pack .getNamespaces (PackType .CLIENT_RESOURCES )) {
109+ Collection <ResourceLocation > allBlockstates = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "blockstates" , Integer .MAX_VALUE , p -> p .endsWith (".json" ));
110+ for (ResourceLocation blockstate : allBlockstates ) {
111+ allAvailableStates .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("blockstates/" , "" ).replace (".json" , "" )));
118112 }
119- return true ;
113+ Collection <ResourceLocation > allModels = pack .getResources (PackType .CLIENT_RESOURCES , namespace , "models" , Integer .MAX_VALUE , p -> p .endsWith (".json" ));
114+ for (ResourceLocation blockstate : allModels ) {
115+ allAvailableModels .add (new ResourceLocation (blockstate .getNamespace (), blockstate .getPath ().replace ("models/" , "" ).replace (".json" , "" )));
116+ }
117+ }
118+ if (!isTrustedPack .test (pack )) {
119+ ModernFix .LOGGER .debug ("Pack with class {} needs manual scan" , pack .getClass ().getName ());
120+ return false ;
120121 }
121- ModernFix .LOGGER .debug ("Pack with class {} needs manual scan" , pack .getClass ().getName ());
122- return false ;
122+ return true ;
123123 });
124124
125125 gatherAdditionalViaManualScan (allPackResources , allAvailableStates , blockStateFiles , "blockstates/" );
@@ -215,6 +215,7 @@ public static void gatherModelMaterials(ResourceManager manager, Predicate<PackR
215215 blockStateData = null ;
216216 blockStateLoadedFiles .clear ();
217217
218+ modelFiles .addAll (allAvailableModels );
218219 /* figure out which models we should actually load */
219220 gatherAdditionalViaManualScan (allPackResources , allAvailableModels , modelFiles , "models/" );
220221 modelFiles .retainAll (allAvailableModels );
0 commit comments