UNPKG

2.23 kBTypeScriptView Raw
1import { MinecraftLocation, Version } from "@xmcl/core";
2import { InstallOptions, SpawnJavaOptions } from "./utils";
3export interface InstallOptifineOptions extends InstallOptions {
4 /**
5 * Use "optifine.OptiFineForgeTweaker" instead of "optifine.OptiFineTweaker" for tweakClass.
6 *
7 * If you want to install upon forge, you should use this.
8 */
9 useForgeTweaker?: boolean;
10}
11/**
12 * Generate the optifine version json from provided info.
13 * @param editionRelease The edition + release with _
14 * @param minecraftVersion The minecraft version
15 * @param launchWrapperVersion The launch wrapper version
16 * @param options The install options
17 * @beta Might be changed and don't break the major version
18 */
19export declare function generateOptifineVersion(editionRelease: string, minecraftVersion: string, launchWrapperVersion?: string, options?: InstallOptifineOptions): Version;
20export interface InstallOptifineOptions extends InstallOptions, SpawnJavaOptions {
21}
22/**
23 * Install optifine by optifine installer
24 *
25 * @param installer The installer jar file path
26 * @param minecraft The minecraft location
27 * @param options The option to install
28 * @beta Might be changed and don't break the major version
29 * @throws {@link BadOptifineJarError}
30 */
31export declare function installOptifine(installer: string, minecraft: MinecraftLocation, options?: InstallOptifineOptions): Promise<string>;
32export declare class BadOptifineJarError extends Error {
33 optifine: string;
34 /**
35 * What entry in jar is missing
36 */
37 entry: string;
38 constructor(optifine: string,
39 /**
40 * What entry in jar is missing
41 */
42 entry: string);
43 error: string;
44}
45/**
46 * Install optifine by optifine installer task
47 *
48 * @param installer The installer jar file path
49 * @param minecraft The minecraft location
50 * @param options The option to install
51 * @beta Might be changed and don't break the major version
52 * @throws {@link BadOptifineJarError}
53 */
54export declare function installOptifineTask(installer: string, minecraft: MinecraftLocation, options?: InstallOptifineOptions): import("@xmcl/task").TaskRoutine<string>;
55//# sourceMappingURL=optifine.d.ts.map
\No newline at end of file