Merge pull request #3956 from jamierocks/block-forge-117-install
NOISSUE Disable Install Forge button on 1.17 (and above)
This commit is contained in:
commit
b902c5cd78
@ -194,8 +194,7 @@ VersionFilePtr OneSixVersionFormat::versionFileFromJson(const QJsonDocument &doc
|
|||||||
LibDLInfo->artifact = out->mojangDownloads["client"];
|
LibDLInfo->artifact = out->mojangDownloads["client"];
|
||||||
lib->setMojangDownloadInfo(LibDLInfo);
|
lib->setMojangDownloadInfo(LibDLInfo);
|
||||||
}
|
}
|
||||||
// we got nothing... guess based on ancient hardcoded Mojang behaviour
|
// we got nothing...
|
||||||
// FIXME: this will eventually break...
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out->addProblem(
|
out->addProblem(
|
||||||
|
@ -212,12 +212,16 @@ void VersionPage::updateVersionControls()
|
|||||||
{
|
{
|
||||||
// FIXME: this is a dirty hack
|
// FIXME: this is a dirty hack
|
||||||
auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft"));
|
auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft"));
|
||||||
bool newCraft = minecraftVersion >= Version("1.14");
|
|
||||||
bool oldCraft = minecraftVersion <= Version("1.12.2");
|
bool supportsFabric = minecraftVersion >= Version("1.14");
|
||||||
ui->actionInstall_Fabric->setEnabled(controlsEnabled && newCraft);
|
ui->actionInstall_Fabric->setEnabled(controlsEnabled && supportsFabric);
|
||||||
ui->actionInstall_Forge->setEnabled(controlsEnabled);
|
|
||||||
ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && oldCraft);
|
bool supportsForge = minecraftVersion <= Version("1.16.5");
|
||||||
ui->actionReload->setEnabled(true);
|
ui->actionInstall_Forge->setEnabled(controlsEnabled && supportsForge);
|
||||||
|
|
||||||
|
bool supportsLiteLoader = minecraftVersion <= Version("1.12.2");
|
||||||
|
ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && supportsLiteLoader);
|
||||||
|
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user