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

Builder for Instance.

Implementations

Instance UUID.

Defaults to uuid::Uuid::new_v4() when using InstanceBuilder.

Name of the instance.

Description of the instance.

Default to an empty string when using InstanceBuilder.

Minecraft version used by the instance.

Path for the instance. This path contains the .minecraft folder and the version data JSON.

Path for libraries.

Path for assets.

Launches the game in fullscreen mode. When set to true, the window size is ignored.

Defaults to false when using InstanceBuilder.

Enables a custom resolution for the game window. Only has an effect when game is not launched in fullscreen mode.

Defaults to false when using InstanceBuilder.

Game window width. Used when enable_window_size is set to true.

Defaults to 1280 when using InstanceBuilder.

Game window height. Used when enable_window_size is set to true.

Defaults to 720 when using InstanceBuilder.

Enables custom memory JVM arguments.

Defaults to false when using InstanceBuilder.

JVM initial heap size in megabytes. Adds the -Xms option to the command. Gets added before jvm_args.

Defaults to 1024 when using InstanceBuilder.

JVM max heap size in megabytes. Adds the -Xmx option to the command. Gets added before jvm_args`.

Defaults to 2048 when using InstanceBuilder.

Enables a custom java executable. Launching an instance tries to use the instances java_exec when enabled, then tries java_exec for

Defaults to false when using InstanceBuilder.

Java executable used to launch minecraft.

Defaults to java when using InstanceBuilder.

Enables custom JVM arguments. When disabled and the version data provides JVM arguments, the arguments from the version data are used. When enabled, arguments from version data are ignored.

Defaults to false when using InstanceBuilder.

Custom JVM arguments.

Defaults to and empty string when using InstanceBuilder.

Created timestamp.

Defaults to time::OffsetDateTime::now_utc() when using InstanceBuilder.

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