Skip to content

Commit

Permalink
Fix default mods toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
The Judge committed Apr 16, 2024
1 parent a44b46f commit 92618f7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/pojlib/instance/MinecraftInstances.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ public void updateMods(String gameDir, MinecraftInstances instances) {
DownloadUtils.downloadFile(info.download_link, mod);
modInfos.add(info);
}
for(ModInfo info : version.defaultMods) {
File mod = new File(gameDir + "/mods/" + modsDirName + "/" + info.slug + ".jar");
DownloadUtils.downloadFile(info.download_link, mod);
modInfos.add(info);
if(defaultMods) {
for (ModInfo info : version.defaultMods) {
File mod = new File(gameDir + "/mods/" + modsDirName + "/" + info.slug + ".jar");
DownloadUtils.downloadFile(info.download_link, mod);
modInfos.add(info);
}
}
mods = modInfos.toArray(modInfos.toArray(new ModInfo[0]));
GsonUtils.objectToJsonFile(gameDir + "/instances.json", instances);
Expand Down

0 comments on commit 92618f7

Please sign in to comment.