Configuration¶
Besides the commands and their flags and options,
HeadlessMc creates a config.properties
file in the HeadlessMC
folder.
This file can be used to configure HeadlessMc further.
All properties that can be put in the config file
can also be specified as system properties on the command line:
hmc.account.refresh.on.game.launch¶
Type: boolean
Default: true
Enable/disable if the launcher should refresh your account when launching the game.
hmc.account.refresh.on.launch¶
Type: boolean
Default: false
Enable/disable if the launcher should refresh your account when it is started.
hmc.additional.classpath¶
Type: String
Default: ""
Additional files to add to the classpath of Minecraft when it is launched.
hmc.always.download.assets.index¶
Type:
boolean
Default: false
Always download the asset index for a Minecraft version. Needed for CheerpJ as it corrupts in the browser and needs a redownload.
hmc.always.in.memory¶
Type: boolean
Default: false
Always launches the game in-memory with -inmemory
.
hmc.always.jndi.flag¶
Type: boolean
Default: true
Always adds the -jndi
flag when launching the game.
hmc.always.lookup.flag¶
Type: boolean
Default: true
Always adds the -lookup
flag when launching the game.
hmc.always.lwjgl.flag¶
Type: boolean
Default: false
Always adds the -lwjgl
flag when launching the game.
hmc.always.pauls.flag¶
Type: boolean
Default: false
Always adds the -paulscode
flag when launching the game.
hmc.always.quit.flag¶
Type: boolean
Default: false
Always adds the -quit
flag when launching the game.
hmc.arm.fix.libraries¶
Type: boolean
Default: true
Minecraft does not provide the correct binary files for Linux on ARM64. This downloads the correct lwjgl binaries from maven central.
hmc.assets.backoff¶
Type: boolean
Default: true
Increases wait time on assets that have failed to download if true
.
hmc.assets.check.file.hash¶
Type: boolean
Default: false
Checks the integrity of all assets before launching. Might clash with hmc.assets.dummy.
hmc.assets.check.hash¶
Type: boolean
Default: true
Checks the integrity of assets when downloading them.
hmc.assets.check.size¶
Type: boolean
Default: true
Checks the size of assets when downloading them.
hmc.assets.delay¶
Type: int
Default: 0
Initial delay to wait for when an asset download failed in milliseconds.
hmc.assets.dummy¶
Type: boolean
Default: false
Uses dummy assets (very small images and sound files), to reduce the memory footprint of Minecraft. Do not use when not running headlessly.
hmc.assets.parallel¶
Type: boolean
Default: true
Downloads assets on multiple threads, speeding up the download process.
hmc.assets.retries¶
Type: int
Default: 3
Min: 1
How many times we want to retry to download an asset that failed to download before failing.
hmc.assumed.java.version¶
Type: int
Default: 8
If we cannot determine the current Java version HeadlessMc is running on, this one will be taken.
hmc.auto.download.java¶
Type: boolean
Default: true
Automatically downloads missing Java versions.
hmc.auto.download.java.rethrow.exception¶
Type: boolean
Default: true
Fails hard on failed Java downloads.
hmc.auto.download.specifics¶
Type: boolean
Default: false
Automatically downloads the hmc-specifics when launching.
hmc.auto.download.versions¶
Type:
boolean
Default: true
Automatically downloads versions when specified in the <modloader>:<version>
format.
hmc.auto.java.distribution¶
Type: String
Default: "temurin"
Java distribution to use when automatically downloading Java.
hmc.check.xvfb¶
Type: boolean
Default: false
Checks if xvfb
is running for offline -lwjgl
checks.
hmc.clientId¶
Type: String
Default: ""
Client id to fill in for the Minecraft client. Is used for telemetry to Mojang.
hmc.crash.report.watcher¶
Type: boolean
Default: false
Watches the game directory for crash-reports that are created, and kills the process if it finds one. This is for testing purposes. Sometimes the game crashes, but a modloader keeps a window open with the crash message, waiting for user input.
hmc.crash.report.watcher.exit¶
Type: boolean
Default: true
Exits with status code -1 if the process has already ended after finding a crash report.
hmc.deencapsulate¶
Type: boolean
Default: true
Enables the deencapsulator for Java 9+ versions. This is needed for some reflection hacks.
hmc.dont.ask.for.quit¶
Type:
boolean
Default: false
The runtime will ask for confirmation when using the quit
command.
With this set to true
not anymore.
hmc.email¶
Type: String
Default: null
Specify hmc.email and hmc.password, to log into an account automatically when the launcher starts.
hmc.enable.reflection¶
Type:
String
Default: false
Enables hacky reflection commands in the runtime and in the hmc-specifics.
hmc.exit.on.failed.command¶
Type: boolean
Default: false
For testing purposes. Exits with status code -1 if a command fails.
hmc.extracted.file.cache.uuid¶
Type: UUID
Default: UUID.randomUUID()
For each game launch a directory for the extracted files is created. This command allows you to specify the name of that directory.
hmc.fabric.url¶
Type: URL
Default: "https://maven.fabricmc.net/net/fabricmc/fabric-installer/1.0.3/fabric-installer-1.0.3.jar"
The URL to download the fabric installer from.
hmc.filehandler.enabled¶
Type: boolean
Default: true
If HeadlessMc should log to a file in the HeadlessMc folder.
For the runtime/hmc-specifics this is false
.
hmc.game.dir.for.each.version¶
Type: boolean
Default: false
Creates a seperate game directory for each version.
hmc.gameargs¶
Type: String[]
Default: []
Similar to the --game-args
option in the launch command.
delimitted list of arguments to launch the game with.
hmc.gamedir¶
Type: String
Default: ".minecraft"
The directory to run the game in.
By default, this is the same as the .minecraft
directory.
hmc.graal.java.version¶
Type: int
Default: 21
The version to launch HeadlessMc with when running from a Graal Native image.
hmc.graal.distribution¶
Type: String
Default: "temurin"
The Java distribution to use for launching HeadlessMc from a Graal Native image.
hmc.graal.force.download¶
Type: boolean
Default: false
Always downloads a Java version when launching HeadlessMc from a Graal Native image.
hmc.graal.jdk¶
Type: boolean
Default: false
Whether to use a JDK for launching HeadlessMc or, by default, a JRE.
hmc.http.user.agent¶
Type: String
Default: "Mozilla/5.0"
The user agent to use for downloads.
hmc.http.user.agent.enabled¶
Type: boolean
Default: true
If the user agent should be added to requests. Needed for web, as browser do not allow requests where the user agent has been set.
hmc.in.memory¶
Type: boolean
Default: false
Set by the launcher when launching Minecraft in-memory. Can be checked by a running instance.
hmc.in.memory.require.correct.java¶
Type: boolean
Default: true
Requires the correct Java version for in-memory, or fails hard.
hmc.install.mc.logging¶
Type: boolean
Default: false
Installs the logging.xml
files defined by Minecraft.
However, these inhibit logging.
hmc.invert.jndi.flag¶
Type:
boolean
Default: false
Inverts the meaning of the -jndi
flag.
hmc.invert.lookup.flag¶
Type:
boolean
Default: false
Inverts the meaning of the -lookup
flag.
hmc.invert.lwjgl.flag¶
Type:
boolean
Default: false
Inverts the meaning of the -lwjgl
flag.
hmc.invert.pauls.flag¶
Type:
boolean
Default: false
Inverts the meaning of the -paulscode
flag.
hmc.invert.quit.flag¶
Type:
boolean
Default: false
Inverts the meaning of the -quit
flag.
hmc.java.always.add.file.permissions¶
Type: boolean
Default: false
jspawnhelper
needs execution permissions on Linux,
so that we can launch newly installed java versions.
hmc.java.require.exact¶
Type: boolean
Default: false
Requires the exact requires version of Java to launch a Java process. If off, e.g. Java 21 can be launched even though Java 17 was requested.
hmc.java.use.current¶
Type: boolean
Default: true
Makes HeadlessMc also consider the version of Java it is running with.
hmc.java.versions¶
Type: String[]
Default: []
;
delimited list of paths to bin/java
of Java versions
HeadlessMc can use.
Not really needed anymore as HeadlessMc can
download Java on its own now.
hmc.jline.bracketed.paste¶
Type: boolean
Default: true
Disables JLine bracketed paste.
hmc.jline.dumb¶
Type: boolean
Default: false
Starts JLine with a dumb terminal.
hmc.jline.dumb.when.no.console¶
Type: boolean
Default: true
Makes JLine terminal dumb if System.console() == null
.
hmc.jline.enable.progressbar¶
Type: boolean
Default: true
Enables progress bar support for JLine.
hmc.jline.enabled¶
Type: boolean
Default: true
Enables JLine.
hmc.jline.exec¶
Type: boolean
Default: false
Enables JLine exec support.
hmc.jline.ffm¶
Type: boolean
Default: false
Enables JLine ffm support.
hmc.jline.force.not.dumb¶
Type: boolean
Default: false
Force JLine not to use a dumb terminal.
hmc.jline.in¶
Type: boolean
Default: false
Makes JLine use System.in
.
hmc.jline.jansi¶
Type: boolean
Default: false
Enables JLine jansi support.
hmc.jline.jna¶
Type: boolean
Default: true
Enables JLine JNA support. JNA is packaged with HeadlessMc and Minecraft and is well supported.
hmc.jline.jni¶
Type: boolean
Default: true
Enables JLine JNI support.
hmc.jline.no.deprecation.warning¶
Type: boolean
Default: true
Prevents JLine deprecation warnings.
hmc.jline.out¶
Type: boolean
Default: false
Makes JLine use System.out
.
hmc.jline.progressbar.style¶
Type: String
Default: COLORFUL_UNICODE_BLOCK
Which progressbar style to use.
hmc.jline.propagate.enabled¶
Type: boolean
Default: true
Propagates hmc.jline.enabled
to Minecraft,
good for hmc-specifics.
hmc.jline.providers¶
Type: String
Default: jni
JLine providers.
hmc.jline.read.prefix¶
Type: String
Default: ""
Read the command line with a prefix, like >
.
hmc.jline.system¶
Type: boolean
Default: null
Whether to use JLine system providers.
hmc.jline.type¶
Type: String
Default: null
Type of JLine to use.
hmc.joml.no.unsafe¶
Type: boolean
Default: true
Adds -Djoml.nounsafe=true
when launching with -lwjgl
.
Needed to not crash.
hmc.jvmargs¶
Type: String
Default: ""
delimited list of JVM args to use when launching Minecraft.
hmc.keepfiles¶
Type: boolean
Default: false
Keeps extracted native files after launching Minecraft.
hmc.launchername¶
Type: String
Default: "HeadlessMc"
Minecraft takes the name of the Launcher as an argument, e.g. for telemetry?
hmc.launcherversion¶
Type: String
Default: "$VERSION"
Minecraft takes the version of the Launcher as an argument, e.g. for telemetry?
hmc.libraries.check.file.hash¶
Type: boolean
Default: false
Check the file hashes of all libraries before launching the game.
hmc.libraries.check.hash¶
Type: boolean
Default: true
Check the file hashes when downloading libraries.
hmc.libraries.check.size¶
Type: boolean
Default: true
Check the file size when downloading libraries.
hmc.loglevel¶
Type: String
Default: "WARNING"
The loglevel at which HeadlessMc logs.
hmc.lwjgl.update_sleep¶
Type: int
Default: 1
Delay in milliseconds to sleep in Minecrafts main loop on Display update.
hmc.lwjgl.gltextureinternalformat¶
Type: int
Default: 32856
Internal texture format for lwjgl instrumentation.
hmc.lwjgl.texturesize¶
Type: int
Default: 1024
Default texture size to return in lwjgl instrumentation.
hmc.lwjgl.fullscreen¶
Type: boolean
Default: true
Fullscreen mode in lwjgl instrumentation.
hmc.lwjgl.screenwidth¶
Type: int
Default: 1920
Screen width in lwjgl instrumentation.
hmc.lwjgl.screenheight¶
Type: int
Default: 1080
Screen width in lwjgl instrumentation.
hmc.lwjgl.refreshrate¶
Type: int
Default: 100
Refresh rate in lwjgl instrumentation.
hmc.lwjgl.bitsperpixel¶
Type: int
Default: 32
Bits per pixel in lwjgl instrumentation.
hmc.lwjgl.nativejniversion¶
Type: int
Default: 24
JNI version in lwjgl instrumentation.
hmc.lwjgl.no.awt¶
Type: boolean
Default: false
If java.awt
is not available, e.g. on Android, this is required.
hmc.main.class¶
Type: String
Default: "net.minecraft.client.main.Main"
Allows you to specify another main class to use in the Minecraft jar to launch.
hmc.main_method¶
Type: String
Default: "net.minecraft.client.main.Main"
The actual main class used. This is e.g. needed when wrapping the game with the hmc-runtime.
hmc.mcdir¶
Type: String
Default: ".minecraft"
The .minecraft
directory.
This is where assets and libraries are stored.
hmc.no.auto.config¶
Type: boolean
Default: false
Does not run the AutoConfiguration step to discover available Java versions when true
.
hmc.offline¶
Type: boolean
Default: false
Enables offline mode.
hmc.offline.token¶
Type: String
Default: ""
Token to use for the offline account.
hmc.offline.type¶
Type: String
Default: "msa"
Type to use for the offline account.
hmc.offline.username¶
Type: String
Default: "Offline"
Username to use for the offline account.
hmc.offline.uuid¶
Type: UUID
Default: "22689332a7fd41919600b0fe1135ee34"
UUID to use for the offline account.
hmc.osarch¶
Type: boolean
Default: null
HeadlessMc will detect your operating system properties.
With these properties you can override what HeadlessMc detects.
true
if your operating system is 64-bit. false
if 32.
hmc.osarchitecture¶
Type: String
Default: null
HeadlessMc will detect your operating system properties. With these properties you can override what HeadlessMc detects. Allows you to override your OS architecture.
hmc.osname¶
Type: String
Default: null
HeadlessMc will detect your operating system properties. With these properties you can override what HeadlessMc detects. Allows you to override your OS name.
hmc.ostype¶
Type: String
Default: null
HeadlessMc will detect your operating system properties. With these properties you can override what HeadlessMc detects. Allows you to override your OS type (LINUX, WINDOWS, MACOS).
hmc.osversion¶
Type: String
Default: null
HeadlessMc will detect your operating system properties. With these properties you can override what HeadlessMc detects. Allows you to override your OS version.
hmc.password¶
Type: String
Default: null
Specify hmc.email and hmc.password, to log into an account automatically when the launcher starts.
hmc.profileproperties¶
Type: Map
Default: "{}"
${profile_properties}
game argument for minecraft.
hmc.rethrow.launch.exceptions¶
Type: boolean
Default: false
Throws all exceptions from launching further. For testing.
hmc.server.accept.eula¶
Type: boolean
Default: false
Automatically accepts Server EULAs.
hmc.server.args¶
Type: String
Default: "nogui"
delimited list of arguments to start the Minecraft server with.
Equivalent to
--game-args
in the server launch
command.
hmc.server.launch.for.eula¶
Type: boolean
Default: true
Automatically launches the Server to get the EULA file if it is not present.
hmc.server.test¶
Type: boolean
Default: false
Runs the HeadlessMc server test when launching the server.
hmc.server.test.build¶
Type: String
Default: ""
hmc.server.test.dir allows you to create a test server. However, HeadlessMc cannot not know which server type is in this directory. With these properties you can specify the information about the server type.
hmc.server.test.cache¶
Type: boolean
Default: false
Enables the server cache
command for caching downloaded servers.
hmc.server.test.cache.use.mc.dir¶
Type: boolean
Default: false
Caches servers in .minecraft
.
hmc.server.test.dir¶
Type: boolean
Default: false
The directory to run the test server in.
hmc.server.test.dir¶
Type: boolean
Default: false
The directory to run the test server in. Usually which directories servers are stored in is handled internally by HeadlessMc. This way you can specify the directory to store a server in.
hmc.server.test.name¶
Type: String
Default: ""
hmc.server.test.dir allows you to create a test server. However, HeadlessMc cannot not know which server type is in this directory. With these properties you can specify the information about the server type.
hmc.server.test.type¶
Type: String
Default: ""
hmc.server.test.dir allows you to create a test server. However, HeadlessMc cannot not know which server type is in this directory. With these properties you can specify the information about the server type.
hmc.server.test.version¶
Type: String
Default: ""
hmc.server.test.dir allows you to create a test server. However, HeadlessMc cannot not know which server type is in this directory. With these properties you can specify the information about the server type.
hmc.set.library.dir¶
Type: boolean
Default: true
Sets the system property libraryDirectory
to .minecraft/libraries
.
This is needed for a fabric (or forge? TODO)
hmc.store.accounts¶
Type: boolean
Default: true
Stores accounts in HeadlessMc/auth/.accounts.json
.
hmc.test.filename¶
Type: String
Default: null
Path to a file containing a command test. If specified the command test will run against server/client.
hmc.test.leave.after¶
Type: boolean
Default: true
Quits HeadlessMc after running a command test.
hmc.test.no.timeout¶
Type: boolean
Default: false
Disables the test timeout if true
.
hmc.tweaker.main.class¶
Type: String
Default: "net.minecraft.client.main.Main"
When using the headlessmc-lwjgl jar as a LaunchWrapper Tweaker.
hmc.userproperties¶
Type: Map
Default: "{}"
${user_properties}
game argument for minecraft.
hmc.vm_size¶
Type: int
Default: 128
Size of the headlessmc-runtime VM memory.
hmc.wrapper.close.classloader¶
Type: boolean
Default: true
Closes the Wrapper classloader after use. For debugging purposes.
hmc.wrapper.debug.classes¶
Type: boolean
Default: false
Outputs classes loaded by the HeadlessMcWrapper.
hmc.wrapper.garbage.collect.hmc¶
Type: boolean
Default: false
Enables a hack that quits and garbage collects the launcher once the game has started, but still listens to the running process.
hmc.wrapper.wrapped.main¶
Type: String
Default: "io.github.headlesshq.headlessmc.launcher.Main"
The Main method to call from the wrapper.
hmc.xuid¶
Type: String
Default: ""
${auth_xuid}
game argument for minecraft.
Probably used by Mojang for telemetry.