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