Appearance
@loontail/minecraft-kit v0.8.14 / InstallActionKinds
Variable: InstallActionKinds
ts
const InstallActionKinds: {
DOWNLOAD_FILE: "download-file";
EXTRACT_NATIVE: "extract-native";
RUN_FORGE_PROCESSOR: "run-forge-processor";
WRITE_LOGGING_CONFIG: "write-logging-config";
WRITE_VERSION_JSON: "write-version-json";
};Action kinds inside an InstallPlan.
Example
ts
import { assertNever, InstallActionKinds, type InstallAction } from "@loontail/minecraft-kit";
const label = (a: InstallAction) => {
switch (a.kind) {
case InstallActionKinds.DOWNLOAD_FILE: return `GET ${a.url}`;
case InstallActionKinds.EXTRACT_NATIVE: return `unzip ${a.source}`;
case InstallActionKinds.RUN_FORGE_PROCESSOR: return `forge ${a.index}`;
case InstallActionKinds.WRITE_VERSION_JSON:
case InstallActionKinds.WRITE_LOGGING_CONFIG: return `write ${a.path}`;
default: return assertNever(a);
}
};Type declaration
| Member | Type | Value |
|---|---|---|
DOWNLOAD_FILE | "download-file" | "download-file" |
EXTRACT_NATIVE | "extract-native" | "extract-native" |
RUN_FORGE_PROCESSOR | "run-forge-processor" | "run-forge-processor" |
WRITE_LOGGING_CONFIG | "write-logging-config" | "write-logging-config" |
WRITE_VERSION_JSON | "write-version-json" | "write-version-json" |