UNPKG

dmclc

Version:

Dolphin Minecraft Launcher Core

54 lines (53 loc) 1.73 kB
import { Launcher } from "./launcher.js"; import { Modpack } from "./mods/modpack/Modpack.js"; import { VersionInfo, VersionInfos } from "./schemas.js"; import { MinecraftVersion } from "./version.js"; /** * Install new Minecraft versions. * @public */ export declare class Installer { launcher: Launcher; /** * Creates a new Installer. * @param launcher - The using launcher. */ constructor(launcher: Launcher); /** * Get all the versions from Mojang. * @returns All the versions. * @throws RequestError */ getVersionList(): Promise<VersionInfos>; /** * Install. * @param ver - The version to install. * @param versionName - The {@link MinecraftVersion.name} of the new version. * @returns The new version. * @throws RequestError */ install(ver: VersionInfo, versionName: string, enableIndependentGameDir?: boolean): Promise<MinecraftVersion>; /** * Install. * @throws RequestError * @param versionId - The version ID. * @param name The name of the new version. * @returns The new version. */ installVersion(versionId: string, name: string, enableIndependentGameDir?: boolean): Promise<MinecraftVersion>; /** * Install modpack. * @throws RequestError * @param modpack - The modpack. * @param name The name of the new version. * @returns The new version. */ installModpack(modpack: Modpack, name: string): Promise<MinecraftVersion>; /** * Install local modpack. * @throws RequestError * @param packPath Modpack path. * @returns Minecraft version. */ installModpackFromPath(packPath: string): Promise<MinecraftVersion | null>; }