use findAll to iterate through mod content (#1313)

This commit is contained in:
Simon Woodburry-Forget
2020-01-04 00:32:03 -05:00
committed by Anuken
parent 7fa61eaf3b
commit 439605f6e8

View File

@@ -512,10 +512,8 @@ public class Mods implements Loadable{
for(ContentType type : ContentType.all){ for(ContentType type : ContentType.all){
Fi folder = contentRoot.child(type.name().toLowerCase() + "s"); Fi folder = contentRoot.child(type.name().toLowerCase() + "s");
if(folder.exists()){ if(folder.exists()){
for(Fi file : folder.list()){ for(Fi file : folder.findAll(f -> f.extension().equals("json") || f.extension().equals("hjson"))){
if(file.extension().equals("json") || file.extension().equals("hjson")){ runs.add(new LoadRun(type, file, mod));
runs.add(new LoadRun(type, file, mod));
}
} }
} }
} }