I'm creating a Minecraft Launcher as a final project for my Computer Science course in C# with WinForms (end me).
Everything vanilla works 1.7.x through 1.12.2 (and 1.6.x except the assets don't load), authentication, game files, libraries, etc. I'm not worried about making other versions work for now.
I'm looking into adding the ability to install Forge from within the launcher. I'd like it to work basically the same as MultiMC, where a user can choose a Forge Version from a list, and the Forge libraries will download and be installed.
I assume this would work by
Downloading Forge jar from files.minecraftforge.net/maven/net/minecraftforge/forge/[minecraft_version]-[forge_version]/forge-[minecraft_version]-[forge_version]-universal.jarand referencing it in the classpath
Downloading extra libraries required by Forge and adding them to the classpath (and natives path?)
Changing the main class to whatever Forge expects
Adding the tweakClass launch arg to whatever Forge expects
Launching the game with the modified launch args
The things I would like to know:
Does Forge have a version manifest I can pull info from like vanilla? If not, how can I get a list of forge versions available (with their respective IDs) for a given Minecraft version
Where do I download Forge libraries from? Opening a forge universal JAR, the libraries are listed in version.json but every URL points to files.minecraftforge.net/maven/, and checking that URL, I don't see the libraries listed anywhere.
Is there any way to download the version.json inside of each Forge JAR directly (without getting the JAR itself)?
Are there any additional native libraries used by forge that need to be extracted?
Are my assumptions above correct? Am I missing anything?
I haven't been able to find any documentation on this stuff, so I would appreciate it if anyone could point me in the right direction. In the meantime, I'll keep digging through launcher sources and see if I can figure anything out.
I would have done that sooner but it seems they are a little hostile towards people creating their own launcher, especially one that downloads Forge directly (understandably, security concerns and bypassing their main source of income).
Anyways, I just ended up using Charles Proxy to reverse engineer how MultiMC handles it, so I'll just stick with that. Thanks for the input!