Fix not correct mod installation
This commit is contained in:
@@ -85,6 +85,7 @@ public final class ModManager {
|
|||||||
|
|
||||||
public void refreshMods() throws IOException {
|
public void refreshMods() throws IOException {
|
||||||
modInfos.clear();
|
modInfos.clear();
|
||||||
|
if (Files.isDirectory(getModsDirectory())) {
|
||||||
for (Path subitem : Files.newDirectoryStream(getModsDirectory())) {
|
for (Path subitem : Files.newDirectoryStream(getModsDirectory())) {
|
||||||
if (Files.isDirectory(subitem) && VersionNumber.isIntVersionNumber(FileUtils.getName(subitem))) {
|
if (Files.isDirectory(subitem) && VersionNumber.isIntVersionNumber(FileUtils.getName(subitem))) {
|
||||||
// If the folder name is game version, forge will search mod in this subdirectory
|
// If the folder name is game version, forge will search mod in this subdirectory
|
||||||
@@ -94,6 +95,7 @@ public final class ModManager {
|
|||||||
addModInfo(subitem.toFile());
|
addModInfo(subitem.toFile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user