Struct cobble_core::minecraft::LaunchOptionsBuilder
source · 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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more