Forge Module
This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.
Usage
Forge Mod Parsing
Read the forge mod metadata, including @Mod
annotation and mcmods.info json data.
import { Forge } from "@xmcl/forge";
const forgeModJarBuff: Buffer;
const metadata: Forge.MetaData[] = Forge.readModMetaData(forgeModJarBuff);
const modid = metadata[0].modid; // get modid of first mods
Read the forge mod config file (.cfg)
const modConfigString: string;
const config: Forge.Config = Forge.Config.parse(modConfigString);
const serializedBack: string = Forge.Config.stringify(config);