Skip to content

@loontail/minecraft-kit v0.8.14 / InstallPlan

Type alias: InstallPlan

ts
type InstallPlan: {
  actions: readonly InstallAction[];
  directory: string;
  runtimeManifest: RuntimeFilesManifest;
  target: InstallPlanTarget;
  targetId: string;
  totalActions: number;
  totalBytes: number;
};

Pre-computed install plan: a flat ordered list of actions plus computed totals.

The runner consumes this; the plan carries a reference to the resolved target so the runner does not need a second target argument.

Planning is side-effect-free for vanilla and Fabric. Forge is the exception: planning a Forge target downloads the installer JAR and extracts its embedded Maven artifacts to libraries/, because the per-library/processor actions can only be enumerated after reading the installer's install_profile.json from disk. Treat install.plan(forgeTarget) as requiring network + disk, not a pure dry-run.

Example

ts
import type { InstallPlan } from "@loontail/minecraft-kit";

const plan: InstallPlan = await kit.install.plan(target);
console.log(`${plan.totalActions} actions, ${(plan.totalBytes / 1e6).toFixed(1)} MB`);
const report = await kit.install.run(plan);

Type declaration

MemberTypeDescription
actionsreadonly InstallAction[]-
directorystring-
runtimeManifestRuntimeFilesManifestJava runtime files manifest resolved during planning, when the plan includes a runtime. Carried so the runner can materialize directory/symlink/executable entries without a second fetch of the same manifest.
targetInstallPlanTarget-
targetIdstring-
totalActionsnumber-
totalBytesnumber-

Source

src/types/install.ts:312

MIT License