Minecraft – How to set Minecraft offline mode player name and also pass parameters into the jar

minecraft-java-edition

I know how to set the Minecraft offline mode player name via:

Java -Xms512m -Xmx1024m -cp "%APPDATA%\.minecraft\bin\*"
     -Djava.library.path="%APPDATA%\.minecraft\bin\natives"  
      net.minecraft.client.Minecraft "MyName"

How do I pass more parameters to the Minecraft jar file? For instance, I would like to pass the directory parameter to the jar.

Also is it possible to make it so that the above line is executed through a Java applet?

Any help is much appreciated 🙂

Best Answer

Disclaimer: I did write the tool I'm going to suggest to use. So, yes, this is shameless self-promotion. And no, this does not include any jars from Mojang, it is a stand-alone launcher-like...uuhhh...thingy...

You can do that with the EasyMineLauncher. It will allow you to set:

  • The directory of the jars
  • The minecraft.jar directly (which allows renaming of said jar)
  • The directory of lwjgl
  • The directory of the lwjgl native files
  • The directory in which the .minecraft directory is stored
  • A username
  • Some window options
  • A server and port to directly connect to

The following drawbacks are coming with that:

  • No updates
  • No authentication (not sure if you can play on Online servers which demand authentication or not)

You can check out the Readme for some further information.