This commit is contained in:
Anuken
2023-02-21 18:15:20 -05:00
parent 4410f31888
commit 39e88ae614
2 changed files with 16 additions and 4 deletions

View File

@@ -428,7 +428,7 @@ public class Mods implements Loadable{
// Add local mods
Seq.with(modDirectory.list())
.filter(f -> f.extEquals("jar") || f.extEquals("zip") || (f.isDirectory() && (f.child("mod.json").exists() || f.child("mod.hjson").exists())))
.filter(f -> f.extEquals("jar") || f.extEquals("zip") || (f.isDirectory() && Structs.contains(metaFiles, meta -> f.child(meta).exists())))
.each(candidates::add);
// Add Steam workshop mods
@@ -1075,6 +1075,9 @@ public class Mods implements Loadable{
/** @return whether this mod is supported by the game version */
public boolean isSupported(){
//no unsupported mods on servers
if(headless) return true;
if(isOutdated() || isBlacklisted()) return false;
return Version.isAtLeast(meta.minGameVersion);