fn2006 / PollyMC

DRM-free Prism Launcher fork with support for custom auth servers.
GNU General Public License v3.0
824 stars 51 forks source link

Fix offline multiplayer in 1.16.4-1.16.5 #153

Open evan-goode opened 7 months ago

evan-goode commented 7 months ago

Resolves https://github.com/fn2006/PollyMC/issues/150

If the game is launched in offline mode, pass invalid API servers via the -Dminecraft.api.* system properties. This workaround is mentioned here: https://github.com/FabricMC/fabric-loom/issues/915#issuecomment-1609154390

I think this change is appropriate to make here in PollyMC even though the Fabric developers decided against using it there. If a user wants to override the API servers back to the vanilla values (in order to use Auth Me or something), they can do so by setting the following custom JVM args on the instance:

-Dminecraft.api.env=PROD
-Dminecraft.api.auth.host=https://authserver.mojang.com
-Dminecraft.api.account.host=https://api.mojang.com
-Dminecraft.api.session.host=https://sessionserver.mojang.com
-Dminecraft.api.services.host=https://api.minecraftservices.com

Previously, auth args would override any user-specified args, but this patch also changes that behavior so user-specified args are now passed last.