From 439605f6e828e33f4a3afaec98b274dca10107d1 Mon Sep 17 00:00:00 2001 From: Simon Woodburry-Forget Date: Sat, 4 Jan 2020 00:32:03 -0500 Subject: [PATCH] use findAll to iterate through mod content (#1313) --- core/src/mindustry/mod/Mods.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index e4907ed26c..ef4af6a8ec 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -512,10 +512,8 @@ public class Mods implements Loadable{ for(ContentType type : ContentType.all){ Fi folder = contentRoot.child(type.name().toLowerCase() + "s"); if(folder.exists()){ - for(Fi file : folder.list()){ - if(file.extension().equals("json") || file.extension().equals("hjson")){ - runs.add(new LoadRun(type, file, mod)); - } + for(Fi file : folder.findAll(f -> f.extension().equals("json") || f.extension().equals("hjson"))){ + runs.add(new LoadRun(type, file, mod)); } } }