Some distros ship MangoHub vulkan layer json with bare shared object name
instead of an absolute path. This breaks environment config as
`MinecraftInstance::createLaunchEnvironment()` seems to require absolute
path of `libMangoHud.so`.
Since we already have `MangoHud::findLibrary()` lying around, use that to
figure out where `libMangoHud.so` really is. In case of a platform that
doesn't support `dlopen()`, fallback to old behavior and return the path
verbatim as it is recorded in vk layer json.
Signed-off-by: Tianhao Chai <cth451@gmail.com>
Resolves https://github.com/fn2006/PollyMC/issues/154
In 1.20+, authlib-injector wants to intercept
https://api.minecraftservices.com/publickeys [0], but if we override the
services server using -Dminecraft.api.services.host, the request does
not get intercepted.
That's not an issue for API servers that implement the /publickeys
route, but Ely.by does not. A decent solution is to not set these
-Dminecraft.api.*.host system properties when authlib-injector is
available, since authlib-injector expects authlib to make requests to
Mojang's API servers.
[0] 18a0ce2669
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.
This should finally fix the Arch Linux Java symbol issue with MangoHUD
enabled: https://bugs.archlinux.org/task/77183
Signed-off-by: Echo J <tcg96nougat@gmail.com>
(cherry picked from commit 01180c20e1)
This should finally fix the Arch Linux Java symbol issue with MangoHUD
enabled: https://bugs.archlinux.org/task/77183
Signed-off-by: Echo J <tcg96nougat@gmail.com>