mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 08:10:11 +00:00
Fix various LiteLoader related bugs.
This commit is contained in:
parent
fbf1cc2848
commit
654f444f55
@ -72,8 +72,6 @@ OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
|
||||
auto smodel = ui->loaderModTreeView->selectionModel();
|
||||
connect(smodel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
|
||||
SLOT(loaderCurrent(QModelIndex, QModelIndex)));
|
||||
|
||||
ui->liteloaderBtn->setEnabled(LiteLoaderInstaller(m_inst->intendedVersionId()).canApply());
|
||||
}
|
||||
// resource packs
|
||||
{
|
||||
@ -98,6 +96,7 @@ void OneSixModEditDialog::updateVersionControls()
|
||||
ui->customizeBtn->setEnabled(!customVersion);
|
||||
ui->revertBtn->setEnabled(customVersion);
|
||||
ui->forgeBtn->setEnabled(true);
|
||||
ui->liteloaderBtn->setEnabled(LiteLoaderInstaller(m_inst->intendedVersionId()).canApply());
|
||||
}
|
||||
|
||||
void OneSixModEditDialog::disableVersionControls()
|
||||
@ -105,6 +104,7 @@ void OneSixModEditDialog::disableVersionControls()
|
||||
ui->customizeBtn->setEnabled(false);
|
||||
ui->revertBtn->setEnabled(false);
|
||||
ui->forgeBtn->setEnabled(false);
|
||||
ui->liteloaderBtn->setEnabled(false);
|
||||
}
|
||||
|
||||
void OneSixModEditDialog::on_customizeBtn_clicked()
|
||||
@ -218,9 +218,18 @@ void OneSixModEditDialog::on_liteloaderBtn_clicked()
|
||||
"into this version of Minecraft"));
|
||||
return;
|
||||
}
|
||||
if (!m_inst->versionIsCustom())
|
||||
{
|
||||
m_inst->customizeVersion();
|
||||
m_version = m_inst->getFullVersion();
|
||||
main_model->setSourceModel(m_version.get());
|
||||
updateVersionControls();
|
||||
}
|
||||
if (!liteloader.apply(m_version))
|
||||
{
|
||||
// failure notice
|
||||
QMessageBox::critical(
|
||||
this, tr("LiteLoader"),
|
||||
tr("For reasons unknown, the LiteLoader installation failed. Check your MultiMC log files for details."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,11 +227,18 @@ void Mod::ReadLiteModInfo(QByteArray contents)
|
||||
QJsonParseError jsonError;
|
||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(contents, &jsonError);
|
||||
auto object = jsonDoc.object();
|
||||
m_mod_id = object.value("name").toString();
|
||||
if(object.contains("name"))
|
||||
{
|
||||
m_mod_id = m_name = object.value("name").toString();
|
||||
}
|
||||
if(object.contains("version"))
|
||||
{
|
||||
m_version=object.value("version").toString("");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_version=object.value("revision").toString("");
|
||||
}
|
||||
m_mcversion = object.value("mcversion").toString();
|
||||
m_authors = object.value("author").toString();
|
||||
m_description = object.value("description").toString();
|
||||
|
Loading…
Reference in New Issue
Block a user