Skip to content

@loontail/minecraft-kit / TargetsApiContext

Type Alias: TargetsApiContext

ts
type TargetsApiContext = {
  fabric: FabricVersionsApi;
  forge: ForgeVersionsApi;
  minecraft: MinecraftVersionsApi;
  runtime: RuntimeVersionsApi;
  system: RuntimeSystem;
};

Defined in: src/targets/index.ts:124

Constructor inputs for TargetsApi.

Example

ts
import {
  detectSystem,
  FabricVersionsApi,
  ForgeVersionsApi,
  MinecraftVersionsApi,
  RuntimeVersionsApi,
  TargetsApi,
  type TargetsApiContext,
} from "@loontail/minecraft-kit";

const ctx: TargetsApiContext = {
  minecraft: new MinecraftVersionsApi(resolverCtx),
  fabric: new FabricVersionsApi(resolverCtx),
  forge: new ForgeVersionsApi(resolverCtx),
  runtime: new RuntimeVersionsApi(resolverCtx),
  system: detectSystem(),
};
const targets = new TargetsApi(ctx);

Properties

PropertyModifierTypeDefined in
fabricreadonlyFabricVersionsApisrc/targets/index.ts:126
forgereadonlyForgeVersionsApisrc/targets/index.ts:127
minecraftreadonlyMinecraftVersionsApisrc/targets/index.ts:125
runtimereadonlyRuntimeVersionsApisrc/targets/index.ts:128
systemreadonlyRuntimeSystemsrc/targets/index.ts:129

MIT License