pub struct LaunchOptionsBuilder { /* private fields */ }
Expand description
Builder for LaunchOptions
.
Implementations§
Source§impl LaunchOptionsBuilder
impl LaunchOptionsBuilder
Sourcepub fn launcher_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn launcher_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Name of the launcher that gets passed as a game argument.
Defaults to the crates name.
Sourcepub fn launcher_version<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn launcher_version<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Version of the launcher that gets passed as a game argument.
Defaults to the crates version.
Sourcepub fn player_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn player_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Player name for the game.
Defaults to Steve
.
Sourcepub fn profile_id(&mut self, value: String) -> &mut Self
pub fn profile_id(&mut self, value: String) -> &mut Self
The profile ID. This is needed for online mode.
Default to None
.
Sourcepub fn token(&mut self, value: String) -> &mut Self
pub fn token(&mut self, value: String) -> &mut Self
The minecraft access token. This is needed for online mode.
Defaults to None
.
Sourcepub fn fullscreen(&mut self, value: bool) -> &mut Self
pub fn fullscreen(&mut self, value: bool) -> &mut Self
Enables fullscreen. Overwrites the custom window size.
Defaults to false
.
Sourcepub fn enable_custom_window_size(&mut self, value: bool) -> &mut Self
pub fn enable_custom_window_size(&mut self, value: bool) -> &mut Self
Enables custom window size.
Takes effect when not launching in fullscreen.
The width and height can be configured with custom_width
and custom_height
.
Defaults to false
.
Sourcepub fn custom_width(&mut self, value: u32) -> &mut Self
pub fn custom_width(&mut self, value: u32) -> &mut Self
Custom game window width.
Used when enable_custom_window_size
is enabled.
Defaults to 1280
.
Sourcepub fn custom_height(&mut self, value: u32) -> &mut Self
pub fn custom_height(&mut self, value: u32) -> &mut Self
Custom game window height.
Used when enable_custom_window_size
is enabled.
Defaults to 720
.
Sourcepub fn enable_custom_memory(&mut self, value: bool) -> &mut Self
pub fn enable_custom_memory(&mut self, value: bool) -> &mut Self
Enables custom JVM memory restrictions.
The minimum and maximum can be configured with custom_min_memory
and custom_max_memory
.
Defaults to false
.
Sourcepub fn custom_min_memory(&mut self, value: u32) -> &mut Self
pub fn custom_min_memory(&mut self, value: u32) -> &mut Self
JVM initial heap size in megabytes.
Adds the -Xms
option to the command.
Gets added before custom_jvm_args
.
Used when enable_custom_memory
is enabled.
Defaults to 1024
.
Sourcepub fn custom_max_memory(&mut self, value: u32) -> &mut Self
pub fn custom_max_memory(&mut self, value: u32) -> &mut Self
JVM max heap size in megabytes.
Adds the -Xmx
option to the command. Gets added before
custom_jvm_args. Used when
enable_custom_memory` is enabled.
Defaults to 2048
.
Sourcepub fn java_executable<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn java_executable<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Java executable.
Defaults to java
.
Sourcepub fn custom_jvm_arguments<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn custom_jvm_arguments<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Custom JVM arguments
Defaults to None
.
Source§impl LaunchOptionsBuilder
impl LaunchOptionsBuilder
Sourcepub fn build(&self) -> LaunchOptions
pub fn build(&self) -> LaunchOptions
Builds new LaunchOptions
.
Trait Implementations§
Source§impl Clone for LaunchOptionsBuilder
impl Clone for LaunchOptionsBuilder
Source§fn clone(&self) -> LaunchOptionsBuilder
fn clone(&self) -> LaunchOptionsBuilder
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more