-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to launch Minecraft on versions past 1.18.2 #78
Comments
Turns out the natives folder is handled differently pre and post 1.19. Before, each version folder just had a natives folder with all the files in it, but after 1.19, it instead creates a new natives folder for each game launch, and removes it every time the game is quit. I tried manually making a new natives folder, but the game always clears it at the start of each launch, and copying the liblwjgl.so file I downloaded into it while its starting up didn't help. The natives folder that minecraft generates on startup (when I'm using the normal minecraft launcher) is named '-natives-' and appears empty when I open it. I've been trying to figure out how to create my own natives folder and have the game use that, but I kind of have no idea what I'm doing so it's been kind of a struggle. |
I made some code to work around the issue, its really scuffed but it works. First, you want to use NativesVersionChecker to return a boolean for if the version needs the patch or not. Then, if it returns true, use NativesDownloader to download the natives. You should run this after using MinecraftLauncherBackend.update. The first argument will be where your versions are stored, the second will be which version's natives to download, and the third will be which version folder to download them into. Usually the second and third argument will be the same, but this may not be the case if you're using a modded version or something. After that, use the NativesCommandPatcher to get a version of the launch command that will use the newly generated Natives folder instead of the default.
After that, just use the patched launch command in place of the normal one, then the game should launch. Hope this helps. |
When launching any Minecraft version after 1.18.2 through the API, the game doesn't launch and returns this error in the output stream:
Here's a bit of the code I'm using
It launches fine when using 1.18.2 and versions below. I honestly don't know if I'm doing something wrong, or if there's something up with the api.
The text was updated successfully, but these errors were encountered: