Class LaunchArguments

java.lang.Object
com.cleanroommc.gradle.api.util.LaunchArguments

public final class LaunchArguments extends Object
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 allow for the current Platform. OS rules match by name and any features rule 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/version entries are kept and substituted.
  • An unknown placeholder in a kept argument becomes an empty string and warns once.
  • Constructor Details

  • Method Details

    • hasGameArguments

      public boolean hasGameArguments()
      Whether the meta carries game arguments in either the modern or legacy form.
    • gameArguments

      public List<String> gameArguments()
      The rendered game (program) arguments. Empty when the meta declares none.
    • jvmArguments

      public List<String> jvmArguments()
      The rendered extra JVM arguments. Empty for legacy metadata.