Overview
Client API commands handle game launching, build management, mod installation, and data persistence. These commands are split across three files:src-tauri/src/app/gui/commands/client.rs- Client launching and API interactionssrc-tauri/src/app/gui/commands/data.rs- Data managementsrc-tauri/src/app/gui/commands/system.rs- System information
Client Launching
run_client
Launch the Minecraft client with LiquidBounce. This command handles the entire launch process including downloading assets, libraries, and starting the game.The LiquidBounce API client instance
The build ID to launch (obtained from
request_builds)Launcher options including account, memory, JVM args, etc.
Array of mods to load with the client
Tauri window instance (automatically passed)
Application state (automatically passed)
Returns nothing on successful launch start. The game runs in a separate thread.
Emitted during launch preparation with progress information
Game console output (stdout and stderr)
Emitted when the client crashes or fails to start
Emitted when the client exits normally
terminate
Terminate the currently running Minecraft client.Returns nothing. Sends SIGTERM to the running client process.
Does nothing if no client is currently running.
Build Management
request_branches
Retrieve all available LiquidBounce branches from the API.The LiquidBounce API client instance
This command uses exponential backoff retry logic for reliability.
request_builds
Retrieve builds for a specific branch.The LiquidBounce API client instance
The branch name (e.g., “nextgen”, “legacy”)
If true, only return release builds. If false, return all builds.
Array of build objects
fetch_changelog
Fetch the changelog for a specific build.The LiquidBounce API client instance
The build ID
Blog & News
fetch_blog_posts
Fetch blog posts from the LiquidBounce blog with pagination.The LiquidBounce API client instance
Page number (1-indexed)
Mod Management
request_mods
Retrieve available mods for a specific Minecraft version and subsystem.The LiquidBounce API client instance
Minecraft version (e.g., “1.20.1”)
Mod loader (“fabric” or “forge”)
Array of available mods
get_custom_mods
Get custom mods installed for a specific branch and Minecraft version.Branch name
Minecraft version
Array of custom mods (with source type “local”)
install_custom_mod
Install a custom mod from a file path.Branch name
Minecraft version
Absolute path to the JAR file
Returns nothing on success. The file is copied to the custom mods directory.
delete_custom_mod
Delete a custom mod.Branch name
Minecraft version
Mod file name (including .jar extension)
Returns nothing on success
Data Commands
get_options
Retrieve the current launcher options from disk.Complete launcher configuration (see
run_client for structure)store_options
Save launcher options to disk.The options object to save
clear_data
Delete cached game data (assets, libraries, etc.).Options to determine the data directory location
default_data_folder_path
Get the default data folder path for this platform.Absolute path to the default data directory
System Commands
get_launcher_version
Get the current launcher version.Launcher version string (e.g., “2.0.0”)
sys_memory
Get system memory in megabytes.Total system memory in megabytes
setup_client
Initialize the LiquidBounce API client with a session token.Session token for API authentication
Initialized API client instance
This command automatically finds the first available API endpoint using fallback logic.
check_system
Perform system checks before launching (Windows only).Returns nothing on success
On Windows, this checks the hosts file for potential issues. On other platforms, this is a no-op.
Source Code
- Client commands:
src-tauri/src/app/gui/commands/client.rs:1 - Data commands:
src-tauri/src/app/gui/commands/data.rs:1 - System commands:
src-tauri/src/app/gui/commands/system.rs:1