Hopefully does some build fixes

This commit is contained in:
Sebastian-byte
2021-11-20 16:26:01 -05:00
parent b3412ca15c
commit 0cbae4aa38
2 changed files with 7 additions and 4 deletions

View File

@@ -914,11 +914,14 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt
process->appendStep(new VerifyJavaInstall(pptr));
}
auto accounts = APPLICATION->accounts();
auto m_acct = accounts->getAccountByProfileName(session->player_name);
// authlib patch
if (session->m_accountPtr->provider()->injectorEndpoint() != "")
if (m_acct->provider()->injectorEndpoint() != "")
{
auto step = new InjectAuthlib(pptr, &m_injector);
step->setAuthServer(session->m_accountPtr->provider()->injectorEndpoint().arg(localAuthServerPort));
step->setAuthServer(m_acct->provider()->injectorEndpoint().arg(localAuthServerPort));
step->setOfflineMode(!session->wants_online);
process->appendStep(step);
}

View File

@@ -20,7 +20,7 @@ void InjectAuthlib::executeTask()
auto latestVersionInfo = QString("https://authlib-injector.yushi.moe/artifact/latest.json");
auto netJob = new NetJob("Injector versions info download");
MetaEntryPtr entry = ENV.metacache()->resolveEntry("injectors", "version.json");
MetaEntryPtr entry = ENV->metacache()->resolveEntry("injectors", "version.json");
if (!m_offlineMode)
{
entry->setStale(true);
@@ -96,7 +96,7 @@ void InjectAuthlib::onVersionDownloadSucceeded()
if (!m_offlineMode)
{
auto netJob = new NetJob("Injector download");
MetaEntryPtr entry = ENV.metacache()->resolveEntry("injectors", m_versionName);
MetaEntryPtr entry = ENV->metacache()->resolveEntry("injectors", m_versionName);
entry->setStale(true);
auto task = Net::Download::makeCached(QUrl(downloadUrl), entry);
netJob->addNetAction(task);