pub struct InstanceBuilder { /* private fields */ }
Expand description

Builder for Instance.

Implementations§

Instance UUID.

Defaults to Uuid::new_v4().

Name of the instance.

Optional description of the instance.

Minecraft version identifier for this instance.

Path for the instance folder. This path contains the .minecraftfolder and some other metadata.

Path for the libraries.

Path for the assets.

Enables fullscreen. Overwrites the custom window size.

Defaults to false.

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.

Custom game window width. Used when enable_custom_window_size is enabled.

Defaults to 1280.

Custom game window height. Used when enable_custom_window_size is enabled.

Defaults to 720.

Enables custom JVM memory restrictions. The minimum and maximum can be configured with custom_min_memory and custom_max_memory.

Defaults to false.

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.

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.

Custom java executable.

Defaults to None.

Custom JVM arguments

Defaults to None.

Environment variables used for launching the game.

Defaults to vec![].

Flag whether the instance was installed.

Defaults to false.

Created timestamp.

Defaults to OffsetDateTime::now_utc().

Available on crate feature fabric only.

Fabric loader version that is used by this instance.

Defaults to None.

Builds a new Instance.

Errors

If a required field has not been initialized.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more