Jump to content

How do I make a launcher?


Raekye

Recommended Posts

Hi, I'm trying to make my own Minecraft launcher. I've looked at resources like Magic Launcher, MultiMC, Sk's launcher, http://www.minecraftforge.net/forum/index.php/topic,1282.0.html, and http://www.minecraftforge.net/forum/index.php/topic,1464.0.html, etc. I really have no idea where to start.

 

1. What should my starting class be? A subclass of applet? From one of the posts it seems like something is happening in FML->relaunchApplet? If I set system property "minecraft.applet.WrapperClass" to my class, it craps out other classes? And in the other forum I (like the OP) don't get what the other members says by "Use minecraft.main"?

 

2. What's the proper way to "launch" the game? Like how should I call it so it doesn't mess up relaunchApplet?

 

I've been stuck on this for a week now, and finally decided to ask for help. There hasn't been much documentation as I expect, regular mods are much different than launchers.

 

If you must know what I'm making:

 

 

I'm trying to make a multimc-magiclauncher (in one, or wherever I get to). Obviously, it's been done, but the solution/implementation is really interesting to me, so I'm giving it a shot.

 

 

 

Thanks for any advice. Cheers,

Raekye

Link to comment
Share on other sites

The method to call is net.minecraft.client.Minecraft.main, this might interest you if you're using java: https://github.com/Forkk/MultiMC4/blob/master/src/launcher/MultiMCLauncher.java

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

Thanks, I'll check it out.

 

I get this error in 1.4.5

Client asked for parameter: server
Exception in thread "Minecraft main thread" java.lang.NoClassDefFoundError: org/
lwjgl/opengl/Display
        at net.minecraft.client.Minecraft.a(SourceFile:205)
        at net.minecraft.client.Minecraft.run(SourceFile:515)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.opengl.Display
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 3 more
Caused by: java.util.zip.ZipException: ZipFile closed
        at java.util.zip.ZipFile.ensureOpenOrZipException(Unknown Source)
        at java.util.zip.ZipFile.access$1300(Unknown Source)
        at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source)
        at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source)

        at java.util.zip.InflaterInputStream.read(Unknown Source)
        at java.util.jar.JarVerifier$VerifierStream.read(Unknown Source)
        at sun.misc.Resource.getBytes(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        ... 9 more

Link to comment
Share on other sites

You need to make sure that you're loading the LWJGL libraries as well - lwjgl.jar, lwjgl_util.jar and jinput.jar and setting property java.library.path to "minecraftdir/natives"

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.