UNPKG

gmll

Version:

A generic launcher core for building custom launchers

37 lines (36 loc) 2.05 kB
import { Dir } from "gfsl"; import type { AssetIndex, CpuArchRuleVal, VersionJsonRules } from "../../types"; /**Gets the current operating system GMLL thinks it is running under */ export declare function getOS(): "linux" | "windows" | "osx"; /**Gets the current CPU architecture for the current running machine. May not be that accurate for Mac OS */ export declare function getCpuArch(): CpuArchRuleVal; /**The processor that handles the rules set out in the version.json for a set version.*/ export declare function lawyer(rules: VersionJsonRules, properties?: { [key: string]: boolean | string | number; }): boolean; /** * Generates the sha1 dir listings for assets and compressed runtime files */ export declare function assetTag(path: Dir, sha1: string): Dir; /**Sanitizes folder names for use in file paths */ export declare function fsSanitizer(text: string): string; /**Used to throw error messages that are easy to find in a busy terminal */ export declare function getErr(message: string): string; /**Used to throw error messages that are easy to find in a busy terminal */ export declare function throwErr(message: string): void; /**Used to get maven class paths */ export declare function classPathResolver(name: string, sub?: string): string; /**Used to remove duplicate packages during initialization phase */ export declare function classPackageResolver(name: string, sub?: string): string; /**Takes two different version.json files and combines them */ export declare function combine<T, T2>(ob1: T, ob2: T2): T & T2; /** * Used to export assets from the modern asset index system the game uses for 1.8+ to a format legacy versions of the game can comprehend. * This is how we get sound working in deprecated versions of Minecraft */ export declare function processAssets(assetManifest: AssetIndex): void; /** * Used to get a unique ID to recognize this machine. Used by mojang in some snapshot builds. * We're just making sure it is sufficiently random */ export declare function getClientID(forceNew?: boolean): string;