fix vanilla technic modpacks

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2024-05-26 09:59:38 +03:00
parent 2145f9f0ac
commit f4f0a61bf2
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -83,8 +83,10 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings,
data = file.readAll(); data = file.readAll();
file.close(); file.close();
} else { } else {
if (minecraftVersion.isEmpty()) if (minecraftVersion.isEmpty()) {
emit failed(tr("Could not find \"version.json\" inside \"bin/modpack.jar\", but Minecraft version is unknown")); emit failed(tr("Could not find \"version.json\" inside \"bin/modpack.jar\", but Minecraft version is unknown"));
return;
}
components->setComponentVersion("net.minecraft", minecraftVersion, true); components->setComponentVersion("net.minecraft", minecraftVersion, true);
components->installJarMods({ modpackJar }); components->installJarMods({ modpackJar });
@ -131,7 +133,9 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings,
file.close(); file.close();
} else { } else {
// This is the "Vanilla" modpack, excluded by the search code // This is the "Vanilla" modpack, excluded by the search code
emit failed(tr("Unable to find a \"version.json\"!")); components->setComponentVersion("net.minecraft", minecraftVersion, true);
components->saveNow();
emit succeeded();
return; return;
} }