From 4580bd49a723dc2564b06f27327eea3074c090f1 Mon Sep 17 00:00:00 2001 From: The Judge Date: Mon, 25 Dec 2023 14:37:34 -0800 Subject: [PATCH] Fix --- lib/src/main/java/pojlib/instance/MinecraftInstance.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/pojlib/instance/MinecraftInstance.java b/lib/src/main/java/pojlib/instance/MinecraftInstance.java index e0f1af85..9621b154 100644 --- a/lib/src/main/java/pojlib/instance/MinecraftInstance.java +++ b/lib/src/main/java/pojlib/instance/MinecraftInstance.java @@ -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")); } } } @@ -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")); } }