From 0a933975f7eba48588ee60e338e461155afe9c8d Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 16:38:16 +0800 Subject: feat: add Fabric and Forge type definitions and update mod.rs for mod loader support --- src-tauri/src/core/mod.rs | 4 ++++ ui/src/types/index.ts | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/src-tauri/src/core/mod.rs b/src-tauri/src/core/mod.rs index 475a304..3c09a76 100644 --- a/src-tauri/src/core/mod.rs +++ b/src-tauri/src/core/mod.rs @@ -2,7 +2,11 @@ pub mod account_storage; pub mod auth; pub mod config; pub mod downloader; +pub mod fabric; +pub mod forge; pub mod game_version; pub mod java; pub mod manifest; +pub mod maven; pub mod rules; +pub mod version_merge; diff --git a/ui/src/types/index.ts b/ui/src/types/index.ts index 1f83585..933aab5 100644 --- a/ui/src/types/index.ts +++ b/ui/src/types/index.ts @@ -37,3 +37,62 @@ export interface JavaInstallation { version: string; is_64bit: boolean; } + +// ==================== Fabric Types ==================== + +export interface FabricGameVersion { + version: string; + stable: boolean; +} + +export interface FabricLoaderVersion { + separator: string; + build: number; + maven: string; + version: string; + stable: boolean; +} + +export interface FabricLoaderEntry { + loader: FabricLoaderVersion; + intermediary: { + maven: string; + version: string; + stable: boolean; + }; + launcherMeta: { + version: number; + mainClass: { + client: string; + server: string; + }; + }; +} + +export interface InstalledFabricVersion { + id: string; + minecraft_version: string; + loader_version: string; + path: string; +} + +// ==================== Forge Types ==================== + +export interface ForgeVersion { + version: string; + minecraft_version: string; + recommended: boolean; + latest: boolean; +} + +export interface InstalledForgeVersion { + id: string; + minecraft_version: string; + forge_version: string; + path: string; +} + +// ==================== Mod Loader Type ==================== + +export type ModLoaderType = "vanilla" | "fabric" | "forge"; + -- cgit v1.2.3-70-g09d2