UNPKG

gmll

Version:

A generic launcher core for building custom launchers

48 lines (47 loc) 2.04 kB
import { Dir, File } from "gfsl"; import type { Artifact, DownloadableFile, MCRuntimeVal, MojangResourceManifest, RuntimeManifest, VersionJson } from "../types"; /** * Download function. Can be used for downloading modpacks and launcher updates. * Checks sha1 hashes and can use multiple cores to download files rapidly. * Untested on Intel's new CPUs, use at own risk and report to me if it breaks. * * -Hanro50 * * @param obj The objects that will be downloaded */ export declare function download(obj: Partial<DownloadableFile>[]): Promise<void>; /** * Installs a set version of Java locally. * @param runtime the name of the Java runtime. Based on the names Mojang gave them. * @returns This is an async function! */ export declare function runtime(runtime: MCRuntimeVal): Promise<void>; /** * Did you know you can use this file to download dungeons? * (We prefer not to be sued...so no more details then that) * * This can decode Mojang's resource file format and download it. * @see {@link encodeMRF} if you want to encode a file into this crazy format. */ export declare function mojangRFDownloader(file: MojangResourceManifest, baseFile: Dir, lzma?: Dir): Promise<void>; /**Install a set version's assets based on a provided asset index from that version. * It is best to let GMLL handle this for you. See the version object instead. */ export declare function assets(index: Artifact): Promise<void>; /**Installs the lib files from a set version */ export declare function libraries(version: VersionJson): Promise<void>; export declare function getRuntimeIndexes(manifest: RuntimeManifest): Promise<void>; export declare function getForgiac(): Promise<File>; /** * Updates GMLL's manifest files. Used internally * * */ export declare function manifests(): Promise<void>; export declare function getAgentFile(): File; /** * Used for runtime management. * Short for encode Mojang Resource Format * */ export declare function encodeMRF(url: string, root: Dir, out: Dir): Promise<MojangResourceManifest>;