Well, this is my project that will allow the launcher not to bother with the launch of the fucking minecraft.
In fact, everything is as simple as possible here - I don’t know why this wasn’t done earlier. I just build a launcher with all the necessary libraries, as well as an applet that allows you to load DLL files into CLASSPATH, after which I call the main method from my JAVA program.
For tests, download the release from releases and run using:
java -jar MinecraftCli.jar --version 1.16.5 --accessToken null --username Leanfe
Launch the game through the launcher, freeze the process after downloading and copy natives from the versions’ folder to natives folder in this project.
I want to note that natives is different for each platform, so you will most likely have to raise Linux/WSL if you want to make the project cross-platform.
Well, now, your task is to upload these files to the server, after which the task of your launcher will be reduced to downloading the mods, maps, … and the assembled JAR file, after which the JAR file will be launched with the transfer of accessToken, version and other fields. (username, server, etc.)