Skip to content

Missing env variables for runClient <=MC1.16.5 #5

@Elec332

Description

@Elec332

On a clean project as per https://github.com/MinecraftForge/MDKExamples/blob/master/obfuscation/fg7/build.gradle

When attempting to runClient a project for any MC version <= 1.16.5 (e.g. MC 1.16.5 Forge 36.2.42) using java 8 SlimeLauncher complains about missing env variables. Example output:

> Task :runClient FAILED
Slime Launcher setup is up-to-date, took 317ms
Launching using main class: net.minecraftforge.userdev.LaunchTesting
2026-03-05 00:04:41,393 main WARN Advanced terminal features are not available in this environment
4 actionable tasks: 1 executed, 3 up-to-date
Exception in thread "main" java.lang.IllegalArgumentException: Environment variable 'assetDirectory' must be set to a valid path.
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:62)
	at net.minecraftforge.launcher.Main$Launcher.run(Main.java:152)
	at net.minecraftforge.launcher.Main$Launcher.access$000(Main.java:138)
	at net.minecraftforge.launcher.Main.main(Main.java:49)
Something went wrong! Here is some debug info.
Args: [--main, net.minecraftforge.userdev.LaunchTesting, --cache, E:\Programming\.environment\.gradle\caches\minecraftforge\forgegradle\slime-launcher\cache\net\minecraftforge\forge\1.16.5-36.2.42, --metadata, E:\Programming\Local\Java\forge-FG7-test\.gradle\mavenizer\repo\net\minecraftforge\forge\1.16.5-36.2.42\forge-1.16.5-36.2.42-metadata.zip, --]
JVM Args: [-XX:+IgnoreUnrecognizedVMOptions, --add-exports=java.base/sun.security.util=ALL-UNNAMED, --add-exports=jdk.naming.dns/com.sun.jndi.dns=java.naming, --add-opens=java.base/java.util.jar=ALL-UNNAMED]
Environment:
	MOD_CLASSES: E:\Programming\Local\Java\forge-FG7-test\build\sourceSets\main;E:\Programming\Local\Java\forge-FG7-test\build\sourceSets\main
	MCP_MAPPINGS: official_1.16.5
	MCP_VERSION: 20210115.111550
	FORGE_VERSION: 36.2.42
	assetIndex: {asset_index}
	assetDirectory: {assets_root}
	nativesDirectory: {natives}
	FORGE_GROUP: net.minecraftforge
	target: fmluserdevclient
	MC_VERSION: 1.16.5
System:
	eventbus.api.strictRuntimeChecks: true
	forge.enabledGameTestNamespaces: examplemod
Options: SlimeLauncherOptionsImpl{name=client, mainClass=net.minecraftforge.userdev.LaunchTesting, args=[], jvmArgs=[-XX:+IgnoreUnrecognizedVMOptions, --add-exports=java.base/sun.security.util=ALL-UNNAMED, --add-exports=jdk.naming.dns/com.sun.jndi.dns=java.naming, --add-opens=java.base/java.util.jar=ALL-UNNAMED], classpath=[], minHeapSize=null, maxHeapSize=null, systemProperties={eventbus.api.strictRuntimeChecks=true, forge.enabledGameTestNamespaces=examplemod}, environment={MOD_CLASSES={source_roots}, MCP_MAPPINGS={mcp_mappings}, MCP_VERSION=20210115.111550, FORGE_VERSION=36.2.42, assetIndex={asset_index}, assetDirectory={assets_root}, nativesDirectory={natives}, FORGE_GROUP=net.minecraftforge, target=fmluserdevclient, MC_VERSION=1.16.5}, workingDir=E:\Programming\Local\Java\forge-FG7-test\run, client=false}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions