Skip to content

Instantly share code, notes, and snippets.

@RX14
Last active August 29, 2015 14:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RX14/c75c96da9a885e16dce5 to your computer and use it in GitHub Desktop.
Save RX14/c75c96da9a885e16dce5 to your computer and use it in GitHub Desktop.
//The lib can obviously be used from Java too
//Add jcenter repository (it's actually the gradle default)
//compile "uk.co.rx14.jmclaunchlib:jMCLaunchLib:0.2.3"
def instance = MCInstance.createForge(
"1.7.10", //Minecraft Version
"1.7.10-10.13.3.1408-1.7.10", //Forge version
"test/instance", //Caches directory
"test/launch", //Run directory
NullSupplier.INSTANCE //Credentials supplier (Supplier<Credential>)
)
def spec = instance.getOfflineLaunchSpec("RX14")
def process = spec.run(new File("/usr/bin/java").toPath()) //A standard java Process object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment