Appearance
@loontail/minecraft-kit v0.5.0 / MinecraftKit
Class: MinecraftKit
Single facade for the entire library.
Example
ts
const kit = new MinecraftKit();
const target = await kit.targets.resolve({ id, directory, minecraft: { version: '1.20.1' }, loader: { type: Loaders.VANILLA } });
const plan = await kit.install.plan(target);
await kit.install.run(plan, { onEvent: console.log });Constructors
new MinecraftKit()
ts
new MinecraftKit(options): MinecraftKitParameters
| Parameter | Type |
|---|---|
options | MinecraftKitOptions |
Returns
Source
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
cache | readonly | MetadataCache | Cache surface useful for advanced consumers (e.g. clearing between operations). |
install | readonly | { runtime: { plan: Promise<InstallPlan>; run: Promise<InstallReport>; standalonePlan: Promise<InstallPlan>; }; plan: Promise<InstallPlan>; run: Promise<InstallReport>; } | - |
install.runtime | readonly | { plan: Promise<InstallPlan>; run: Promise<InstallReport>; standalonePlan: Promise<InstallPlan>; } | Install only the Java runtime declared by target.runtime (honours installRoot). |
install.runtime.plan | readonly | Promise<InstallPlan> | - |
install.runtime.run | readonly | Promise<InstallReport> | - |
install.runtime.standalonePlan | readonly | Promise<InstallPlan> | - |
install.plan | readonly | Promise<InstallPlan> | - |
install.run | readonly | Promise<InstallReport> | - |
launch | public | { compose: Promise<LaunchComposition>; run: LaunchSession; } | - |
launch.compose | public | Promise<LaunchComposition> | - |
launch.run | public | LaunchSession | - |
repair | public | { fabric: RepairAspect; forge: RepairAspect; minecraft: RepairAspect; runtime: RepairAspect; } | - |
repair.fabric | public | RepairAspect | Repair the Fabric loader slice (profile JSON + libraries). Throws on non-Fabric targets. |
repair.forge | public | RepairAspect | Repair the Forge loader slice (version JSON + libraries + processors). Throws on non-Forge. |
repair.minecraft | public | RepairAspect | Repair the vanilla Minecraft slice (client jar, libraries, assets, natives, log config). |
repair.runtime | public | RepairAspect | Repair the Java runtime files. Honours target.runtime.installRoot. |
targets | public | TargetsApi | - |
update | public | { plan: Promise<UpdatePlan>; run: Promise<UpdateReport>; } | - |
update.plan | public | Promise<UpdatePlan> | - |
update.run | public | Promise<UpdateReport> | - |
verify | public | { fabric: { run: Promise<VerificationResult>; }; forge: { run: Promise<VerificationResult>; }; minecraft: { run: Promise<VerificationResult>; }; runtime: { run: Promise<VerificationResult>; }; } | - |
verify.fabric | public | { run: Promise<VerificationResult>; } | Verify the Fabric loader slice (profile JSON + libraries). Throws on non-Fabric targets. |
verify.fabric.run | public | Promise<VerificationResult> | - |
verify.forge | public | { run: Promise<VerificationResult>; } | Verify the Forge loader slice (version JSON + libraries). Throws on non-Forge targets. |
verify.forge.run | public | Promise<VerificationResult> | - |
verify.minecraft | public | { run: Promise<VerificationResult>; } | Verify the vanilla Minecraft slice (client jar, libraries, assets, natives, log config). |
verify.minecraft.run | public | Promise<VerificationResult> | - |
verify.runtime | public | { run: Promise<VerificationResult>; } | Verify the Java runtime files. Honours target.runtime.installRoot for shared installs. |
verify.runtime.run | public | Promise<VerificationResult> | - |
versions | public | { fabric: FabricVersionsApi; forge: ForgeVersionsApi; minecraft: MinecraftVersionsApi; runtime: RuntimeVersionsApi; } | - |
versions.fabric | public | FabricVersionsApi | - |
versions.forge | public | ForgeVersionsApi | - |
versions.minecraft | public | MinecraftVersionsApi | - |
versions.runtime | public | RuntimeVersionsApi | - |