Compare commits

...

2 Commits

Author SHA1 Message Date
CactiChameleon9 e575bedc80 Upload files to "/" 2026-04-15 09:46:25 +01:00
CactiChameleon9 85fbfc922e Remove auth 2026-01-29 19:49:46 +01:00
2 changed files with 48 additions and 3 deletions
+45
View File
@@ -0,0 +1,45 @@
From 649d15e8621a997cc97d9c8a123ce570016258ed Mon Sep 17 00:00:00 2001
From: CactiChameleon9 <51231053+CactiChameleon9@users.noreply.github.com>
Date: Wed, 15 Apr 2026 10:45:29 +0200
Subject: [PATCH] Rework auth
---
launcher/LaunchController.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp
index d263cc50a..ac501f689 100644
--- a/launcher/LaunchController.cpp
+++ b/launcher/LaunchController.cpp
@@ -91,7 +91,7 @@ void LaunchController::decideAccount()
m_accountToUse = accounts->at(instanceAccountIndex);
}
- if (!accounts->anyAccountIsValid()) {
+ if (false) {
// Tell the user they need to log in at least one account in order to play.
auto reply = CustomMessageBox::selectable(m_parentWidget, tr("No Accounts"),
tr("In order to play Minecraft, you must have at least one Microsoft "
@@ -144,8 +144,8 @@ LaunchDecision LaunchController::decideLaunchMode()
const auto* accounts = APPLICATION->accounts();
MinecraftAccountPtr accountToCheck = nullptr;
- if (m_accountToUse->accountType() != AccountType::Offline) {
- accountToCheck = m_accountToUse->ownsMinecraft() ? m_accountToUse : nullptr;
+ if (true) {
+ accountToCheck = m_accountToUse;
} else if (const auto defaultAccount = accounts->defaultAccount(); defaultAccount && defaultAccount->ownsMinecraft()) {
accountToCheck = defaultAccount;
} else {
@@ -187,7 +187,7 @@ LaunchDecision LaunchController::decideLaunchMode()
}
QString reauthReason;
- switch (state) {
+ switch (AccountState::Online) {
case AccountState::Errored:
reauthReason = tr("An error occurred while refreshing '%1'").arg(accountToCheck->profileName());
break;
--
2.53.0
+3 -3
View File
@@ -88,7 +88,7 @@ void LaunchController::decideAccount()
// Find an account to use.
auto accounts = APPLICATION->accounts();
if (accounts->count() <= 0 || !accounts->anyAccountIsValid()) {
if (false) {
// Tell the user they need to log in at least one account in order to play.
auto reply = CustomMessageBox::selectable(m_parentWidget, tr("No Accounts"),
tr("In order to play Minecraft, you must have at least one Microsoft "
@@ -238,7 +238,7 @@ void LaunchController::login()
MinecraftAccountPtr accountToCheck;
if (m_accountToUse->ownsMinecraft())
if (true)
accountToCheck = m_accountToUse;
else if (const MinecraftAccountPtr defaultAccount = APPLICATION->accounts()->defaultAccount();
defaultAccount != nullptr && defaultAccount->ownsMinecraft()) {
@@ -263,7 +263,7 @@ void LaunchController::login()
return;
}
switch (accountToCheck->accountState()) {
switch (AccountState::Online) {
case AccountState::Offline: {
m_session->wants_online = false;
}