Skip to content

@loontail/minecraft-kit v0.8.14 / MinecraftLibrary

Type alias: MinecraftLibrary

ts
type MinecraftLibrary: {
  downloads: MinecraftLibraryDownloads;
  extract: {
     exclude: readonly string[];
    };
  name: string;
  natives: Readonly<Record<string, string>>;
  rules: readonly LibraryRule[];
  url: string;
};

Library entry. Combines vanilla, modern-natives, and legacy-classifier shapes.

Example

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

const libs: readonly MinecraftLibrary[] = resolved.manifest.libraries;
const ruled = libs.filter((l) => l.rules !== undefined);
console.log(`${libs.length} libraries, ${ruled.length} gated by rules`);

Type declaration

MemberTypeDescription
downloadsMinecraftLibraryDownloads-
extract{
exclude: readonly string[];
}-
extract.excludereadonly string[]-
namestring-
nativesReadonly<Record<string, string>>-
rulesreadonly LibraryRule[]-
urlstringSome Fabric/Forge libraries carry only a Maven base URL plus a coordinate.

Source

src/types/minecraft.ts:185

MIT License