/** * Modpack compatibility matrix - Domain utility * * Aggregates a list of {@link ModVersion} (e.g. from a Modrinth modpack project) * into a loader → game-version compatibility matrix. This lets the UI present * only valid (loader, Minecraft version) combinations and lets the API validate * server creation requests, preventing the "No files available" failure that * occurs when an incompatible VERSION/MODRINTH_LOADER pair is passed to itzg. * * Pure domain logic: no external dependencies, no I/O. */ import type { ModVersion } from './ModVersion.js'; /** * Compatibility information for a single mod loader. */ export interface LoaderCompatibility { /** Minecraft versions supported by this loader, sorted newest-first. */ gameVersions: string[]; /** * Recommended modpack version number for each game version * (the newest modpack release supporting that game version). * Keyed by Minecraft game version. */ recommended: Record; } /** * Loader → compatibility matrix for a modpack project. */ export interface ModpackCompatibilityMatrix { /** Supported mod loaders, sorted alphabetically. */ loaders: string[]; /** Per-loader compatibility info. */ byLoader: Record; } /** * Build a loader → game-version compatibility matrix from modpack versions. * * Versions are expected to be supplied newest-first (as Modrinth returns them), * so for each (loader, game version) cell the first version encountered is * treated as the recommended/latest one. * * Versions with no loaders are ignored. * * @param versions - Modpack project versions * @returns Aggregated compatibility matrix */ export declare function buildModpackCompatibilityMatrix(versions: ModVersion[]): ModpackCompatibilityMatrix; /** * Check whether a (loader, game version) combination is supported by the matrix. * * Loader comparison is case-insensitive. * * @param matrix - Compatibility matrix from {@link buildModpackCompatibilityMatrix} * @param loader - Mod loader name (e.g. "neoforge") * @param gameVersion - Minecraft version (e.g. "1.21.1") * @returns true if the modpack has a release for this combination */ export declare function isModpackCompatible(matrix: ModpackCompatibilityMatrix, loader: string, gameVersion: string): boolean; //# sourceMappingURL=modpackCompatibility.d.ts.map