Class LaunchArguments
java.lang.Object
com.cleanroommc.gradle.api.util.LaunchArguments
Renders the Minecraft launch arguments for a
VersionMeta independent of Gradle.
Handles both the modern (1.13+) arguments {game, jvm} block and the legacy
(minecraftArguments) template string. Then, evaluating rules and substituting the ${placeholder} tokens.
Rendering rules:
- Plain (rule-less) arguments are always kept.
- Rule-gated arguments are kept only when the rules resolve to
allowfor the currentPlatform. OS rules match by name and anyfeaturesrule would be dropped due to it being unmet. - JVM arguments additionally skip the classpath pair (
-cp/${classpath}, supplied by JavaExec) and any-Djava.library.path=entry (the run task sets that system property itself). The-Dminecraft.launcher.brand/versionentries are kept and substituted. - An unknown placeholder in a kept argument becomes an empty string and warns once.
-
Constructor Summary
ConstructorsConstructorDescriptionLaunchArguments(VersionMeta meta, Map<String, String> substitutions, Platform platform, Consumer<String> warn) -
Method Summary
Modifier and TypeMethodDescriptionThe rendered game (program) arguments.booleanWhether the meta carries game arguments in either the modern or legacy form.The rendered extra JVM arguments.
-
Constructor Details
-
LaunchArguments
-
-
Method Details
-
hasGameArguments
public boolean hasGameArguments()Whether the meta carries game arguments in either the modern or legacy form. -
gameArguments
-
jvmArguments
-