Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
The Judge committed Dec 25, 2023
1 parent cbb0357 commit 4580bd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/main/java/pojlib/instance/MinecraftInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ public void updateOrDownloadMods() {
if (!newVer.name.equals(this.versionName)) {
continue;
}
for(CoreMods.Mod newMod : version.mods) {
for(CoreMods.Mod newMod : newVer.mods) {
if(!newMod.version.equals(mod.version) && newMod.slug.equals(mod.slug)) {
DownloadUtils.downloadFile(newMod.download_link, new File(Constants.MC_DIR + "/mods/" + this.versionName + "/" + mod.slug + ".jar"));
API_V1.currentDownload = newMod.slug;
DownloadUtils.downloadFile(newMod.download_link, new File(Constants.MC_DIR + "/mods/" + this.versionName + "/" + newMod.slug + ".jar"));
}
}
}
Expand All @@ -191,6 +192,7 @@ public void updateOrDownloadMods() {
continue;
}
for(CoreMods.Mod mod : version.mods) {
API_V1.currentDownload = mod.slug;
DownloadUtils.downloadFile(mod.download_link, new File(Constants.MC_DIR + "/mods/" + this.versionName + "/" + mod.slug + ".jar"));
}
}
Expand Down

0 comments on commit 4580bd4

Please sign in to comment.