Launching Configuration
1. The LaunchConfiguration
The LaunchConfiguration is the central configuration object for launching Minecraft with Minified.
It can be built using the LaunchConfiguration.Builder class, which provides a fluent API for setting various launch parameters.
Example usage:
LaunchConfiguration config = new LaunchConfiguration.Builder()
.downloadThreads(10)
.launcherName("YourLauncherName")
.launcherVersion("1.0.0")
.assetsDirectory(Path.of("<assets-directory>"))
.librariesDirectory(Path.of("<libraries-directory>"))
.jarFile(Path.of("<client.jar>"))
.isDemoUser(false)
.loader(new VanillaLoader("1.21.11"))
.build();val config = LaunchConfiguration.Builder()
.downloadThreads(10)
.launcherName("YourLauncherName")
.launcherVersion("1.0.0")
.assetsDirectory(Path.of("<assets-directory>"))
.librariesDirectory(Path.of("<libraries-directory>"))
.jarFile(Path.of("<client.jar>"))
.isDemoUser(false)
.loader(VanillaLoader("1.21.11"))
.build()2. Fields
Configure how Minecraft is downloaded, prepared, and launched.
Configuration Fields 17 available fields
minRam
Optional
The minimum amount of RAM allocated to the Minecraft process.
maxRam
Optional
The maximum amount of RAM allocated to the Minecraft process.
downloadThreads
Optional
The number of threads used for downloading assets and libraries.
resolutionWidth
Optional
The width of the Minecraft window. Only takes effect if set together with resolutionHeight via the resolution(width, height) builder method - see the note below.
resolutionHeight
Optional
The height of the Minecraft window. Only takes effect if set together with resolutionWidth via the resolution(width, height) builder method - see the note below.
launcherName
Optional
The name of the launcher. May be displayed in-game or in logs.
launcherVersion
Optional
The launcher version. May be displayed in-game or in logs.
demoUser
Optional
Controls whether Minecraft launches in demo mode.
jarFile
Required
The path to the Minecraft client JAR file.
librariesDirectory
Required
The directory where Minecraft libraries are stored.
assetsDirectory
Required
The directory where Minecraft assets are stored.
nativesDirectory
Optional
The directory where native libraries are extracted.
customJavaExecutable
Optional
A custom Java executable used to launch Minecraft.
extraJvmArgs
Optional
Additional JVM arguments passed to the Minecraft process.
loader
Required
The loader used to launch Minecraft. Must implement the
Loader interface.
offlineUsername
Optional
The username used when launching Minecraft in offline mode.
eventBus
Optional
The EventBus used to dispatch events during the launch process.