pub struct LaunchOptions {
pub account: Account,
pub java_executable: Option<PathBuf>,
pub game_directory: Option<PathBuf>,
pub natives_directory: Option<PathBuf>,
pub launcher_name: String,
pub launcher_version: String,
pub custom_resolution: Option<(u32, u32)>,
pub demo: bool,
pub server: Option<(String, Option<u16>)>,
pub disable_multiplayer: bool,
pub disable_chat: bool,
pub compatibility: CompatibilityPolicy,
}Expand description
User and process settings used while building a launch command.
Start with LaunchOptions::default and override only the fields your
launcher exposes. By default the game directory is isolated under
<minecraft_dir>/versions/<version_id>, which keeps saves, options, logs,
and mods separate per installed profile.
Fields§
§account: AccountAccount values substituted into Minecraft’s auth placeholders.
java_executable: Option<PathBuf>Java executable to run.
If omitted, the command uses java and relies on the caller’s PATH.
game_directory: Option<PathBuf>Game directory passed as ${game_directory} and used as process CWD.
If omitted, a version-isolated directory is used.
natives_directory: Option<PathBuf>Directory containing extracted native libraries.
If omitted, this points at <minecraft_dir>/versions/<version_id>/natives.
launcher_name: StringLauncher name passed to modern version argument templates.
launcher_version: StringLauncher version passed to modern version argument templates.
custom_resolution: Option<(u32, u32)>Optional window size appended as --width and --height.
demo: boolEnables Minecraft demo mode.
server: Option<(String, Option<u16>)>Optional multiplayer server and port to join after launch.
disable_multiplayer: boolAppends the modern --disableMultiplayer flag.
disable_chat: boolAppends the modern --disableChat flag.
compatibility: CompatibilityPolicyControls whether known compatibility patches are applied before building.
Trait Implementations§
Source§impl Clone for LaunchOptions
impl Clone for LaunchOptions
Source§fn clone(&self) -> LaunchOptions
fn clone(&self) -> LaunchOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more