Conversation
There was a problem hiding this comment.
Pull request overview
This PR disables the offline skin functionality when launching games from the Terracotta (陶瓦) multiplayer interface to prevent potential conflicts or issues during multiplayer gameplay.
Key changes:
- Added a new
logInWithoutSkin()method toOfflineAccountthat returns authentication info without loading skin configurations - Introduced a
disableOfflineSkinflag inLauncherHelperto conditionally disable offline skin loading - Modified
HMCLGameRepository.getLaunchOptions()to return aBuilderinstead of a completedLaunchOptionsobject, allowing further configuration before launch
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| HMCLCore/src/main/java/org/jackhuang/hmcl/auth/offline/OfflineAccount.java | Added logInWithoutSkin() method to provide authentication without skin loading capabilities; refactored logIn() to use the new method |
| HMCL/src/main/java/org/jackhuang/hmcl/game/LauncherHelper.java | Added disableOfflineSkin field and setter; modified login logic to use logInWithoutSkin() when flag is enabled; sets daemon to false when offline skin is disabled |
| HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java | Changed return type from LaunchOptions to LaunchOptions.Builder to allow additional configuration |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/terracotta/TerracottaPage.java | Updated launch callback to call setDisableOfflineSkin() when launching from Terracotta interface; removed unused import |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/terracotta/TerracottaControllerPage.java | Updated launch callback to call setDisableOfflineSkin() when launching from Terracotta controller interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| public AuthInfo logInWithoutSkin() throws AuthenticationException { | ||
| // Using "legacy" user type here because "mojang" user type may cause "invalid session token" or "disconnected" when connecting to a game server. |
There was a problem hiding this comment.
The comment mentions using "legacy" user type, but the code actually uses AuthInfo.USER_TYPE_MSA which is "msa", not "legacy". The comment should be updated to accurately reflect the user type being used, or the code should be changed to use AuthInfo.USER_TYPE_LEGACY if that was the original intent.
| // Using "legacy" user type here because "mojang" user type may cause "invalid session token" or "disconnected" when connecting to a game server. | |
| // Using "msa" user type here to avoid potential "invalid session token" or "disconnected" issues when connecting to a game server. |
No description provided.