Appearance
Forge
kit.versions.forge reads maven.minecraftforge.net/.../maven-metadata.xml and the promotions_slim.json mapping. The installer planner supports both modern processor-based Forge installers and legacy installers that ship an embedded universal JAR.
ts
import { Loaders, VersionPreference } from "@loontail/minecraft-kit";
const builds = await kit.versions.forge.list({ minecraftVersion: "1.7.10" });
const resolved = await kit.versions.forge.resolve({
minecraftVersion: "1.7.10",
preference: VersionPreference.RECOMMENDED,
});Install flow
The Forge install is the most involved flow in the library:
- Download the installer JAR to
forge-installers/<full>-installer.jar. - Open the JAR and read
install_profile.json. - Branch by installer shape.
- Modern profiles read the referenced
version.json, extract embeddedmaven/entries intolibraries/<group>/<artifact>/<version>/, resolve data tokens, and plan processor invocations. - Legacy profiles read
versionInfo, extract the embedded universal JAR referenced byinstall.filePathinto its Maven library path, and skip processors.
- Modern profiles read the referenced
- Plan downloads for every declared library that is not already supplied by the installer archive.
- Run downloads in parallel; install the runtime; run processors sequentially when the profile declares them; verify every declared
outputSHA-1. - Write
versions/<forge-id>/<forge-id>.jsonso the launch composer can find the merged manifest.
Built-in processor tokens
| Token | Resolved value |
|---|---|
{SIDE} | "client" |
{MINECRAFT_JAR} | <directory>/versions/<mc>/<mc>.jar |
{MINECRAFT_VERSION} | <mc> |
{ROOT} | <directory> (the per-target root) |
{INSTALLER} | Absolute path to the downloaded installer JAR |
{LIBRARY_DIR} | <directory>/libraries |
[g:a:v[:c][@e]] references are resolved to absolute paths under LIBRARY_DIR.