Inside A Minecraft Launcher
Recently, I’ve been playing around with writing a Minecraft launcher from scratch, and also
contributing to PolyMC and ManyMC. Through these harrowing interesting experiences, I
have gathered a lot of knowledge about how Minecraft launchers actually work from the
And I thought it would be nice to share this information with those of you who want to work on
this topic yourself, since the current documentation isn’t very complete.
Installing a vanilla version is the basis for everything else. I will write about installing loaders
like Fabric and Forge later on, but this is the most basic thing launchers should do.
0. The working directory
The working directory depends on the system. In any case it is a specific directory reserved
for Minecraft. For the official launcher this is one single directory, while in multi-instance
launchers like MultiMC or HMCL, this directory can be customized according to the launcher.
However, most of the files you download / generate will be in this directory.
This directory will henceforth be referred to as .minecraft for convenience. This is the
directory used on Linux.
1. The Version Manifest
The version manifest is the single source of truth for what versions there are. The URL is
https://launchermeta.mojang.com/mc/game/version_manifest.json, and the format is
approximately like this:
Obviously, the latest key corresponds to the latest versions for releases and snapshots. In
the versions list, there is an ID (the name of the version), the type (release or snapshot), the
URL to the version data, and the time and release time (which don’t really matter that much).
The version data URL is going to be used in the next step.
2. The Version Data
After selecting the version, the JSON data from "url" would be downloaded to
.minecraft/versions//.json. This version data JSON has a few sections of data:
"arguments" - arguments to pass
This contains the arguments to run the main JAR with. The "jvm" flags are to be provided