Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Custom Minecraft Launcher


  • Please log in to reply
10 replies to this topic

#1

GeekGuy96

Posted 08 October 2011 - 05:06 AM

Hello Fellow Modders,
  I am currently running a server with lots of mods on it.  I was hopping to figure out how to create a custom launcher that checked my server for the newest modded minecraft.jar.  I want to be able to do this so it is easier for less experienced users to use my custom jar.  After scouring the internet for hours I have yet to find default minecraft launcher source.  If anyone can help me with this project I would greatly appreciate it.

Thanks in Advanced,
  GeekGuy96
My Current Devices:
MacBook Pro 13" 2.4ghz 2011 Model
Sony Vaio PCV-RS320
Verizon iPhone 4 32gb
2nd Generation iPod Touch 32gb
1st Generation iPad 32gb

Register or log in to remove.

#2

jf46784
    jf46784

    Zombie Killer

  • Curse Premium
  • Curse Premium
  • 237 posts
  • Location: In ur cupboard, eatin ur cookies............
  • Minecraft: jf46784

Posted 08 October 2011 - 08:20 AM

I would also like to do this.
I'm a modder! Need help with some code? Send me a PM!
If I helped you in any way, then help me by pressing the green +.

#3

Slay3R?
    Slay3R?

    Void Walker

  • Members
  • 1570 posts
  • Location: High up in the sky

Posted 08 October 2011 - 11:16 AM

Why don't you write your own launcher instead of modifying the existing one.

#4

Wirsbo
    Wirsbo

    Redstone Miner

  • Members
  • 613 posts
  • Minecraft: Potet_Admin

Posted 08 October 2011 - 11:42 AM

Can you code java? Any other language? No? Then good luck...
Posted Image

#5

GeekGuy96

Posted 08 October 2011 - 12:38 PM

I can write HTML and PHP.  I also have a book on Java if I absolutely couldn't fudge my way through this without large amounts of experience.  I also have people working with me who do know Java so this is more of asking for them.  I asked about modifying the existing launcher because it just seemed a hell of a lot easier.  If you know anything about the launcher you know that inside the contents of either the minecraft.exe or minecraft.app, you know that its just a script for launching a minecraftlauncher.jar which does all the work.  But thanks for being useless everyone who posted.  In the future don't post unless your answer is helpful
My Current Devices:
MacBook Pro 13" 2.4ghz 2011 Model
Sony Vaio PCV-RS320
Verizon iPhone 4 32gb
2nd Generation iPod Touch 32gb
1st Generation iPad 32gb

#6

Slay3R?
    Slay3R?

    Void Walker

  • Members
  • 1570 posts
  • Location: High up in the sky

Posted 08 October 2011 - 01:28 PM

View PostGeekGuy96, on 08 October 2011 - 12:38 PM, said:

I can write HTML and PHP.  I also have a book on Java if I absolutely couldn't fudge my way through this without large amounts of experience.  I also have people working with me who do know Java so this is more of asking for them.  I asked about modifying the existing launcher because it just seemed a hell of a lot easier.  If you know anything about the launcher you know that inside the contents of either the minecraft.exe or minecraft.app, you know that its just a script for launching a minecraftlauncher.jar which does all the work.  But thanks for being useless everyone who posted.  In the future don't post unless your answer is helpful

I found my answer rather useful to be honest...
Why bother decompiling, modifying and then recompiling the existing launcher if you can simply create your own that contacts a server to get the latest jar and check it against the client jar. Update if needed then launch the jar.
I'd suggest for you not to tell me what to do.

#7

DocterDocter

Posted 08 October 2011 - 04:56 PM

I have written a custom launcher before and have some pointers:
  • It is easier to decompile and modify than write it yourself, the code isn't obfuscated
  • Java is (slightly) more similar to javascript than PHP (if that helps)
  • Change the page for the modded Launcher to one for your server so users know they are getting the modded one
  • If you want, pass minecraft parameters to automatically log into the server
  • To check if it needs to be updated, have a page on the server that returns the latest version - should be easy enough to do in php
  • Give your minecraft.jar a different name (and change the classpath in the launcher)
  • Don't download a whole minecraft.jar from the server, this is generally frowned upon. Instead, use the user/pass provided to download the one from minecraft.net, then download modifications from the server, patch them in and delete any stuff that starts with "META-INF", zip files are reasonably easy to work with in java and jar files are in the same format (look it up, theres loads of stuff about zip files)

If what I have said/done/made (delete as applicable) has helped you, why not press that button just there
it looks like (+).


#8

GeekGuy96

Posted 11 October 2011 - 02:23 AM

Thanks so much man,
  I wasn't saying that I thought that php was like Java someone had asked if I had any programming experience.  How would I go about decompiling the minecraftlauncher.jar?  Would I use mcp some how?

Thanks so much,
  GeekGuy96
My Current Devices:
MacBook Pro 13" 2.4ghz 2011 Model
Sony Vaio PCV-RS320
Verizon iPhone 4 32gb
2nd Generation iPod Touch 32gb
1st Generation iPad 32gb

#9

gf11221
    gf11221

    Coal Miner

  • Members
  • 121 posts
  • Minecraft: Unknown_Creator

Posted 11 October 2011 - 04:50 AM

Its easy to do so although you have enough skills in Web development and the launcher isn't a jar-like file that you can just decompile using some programs, You should try zombiecraft first and you will notice that the launcher's web redirection was altered, using that method(XML AUTO-FTP)you can automatically update your minecraft.jar or whatever it is also you need to change the classpath and some parameters in minecraft.java applet thingy(decompile the jars first)

I'm also using this on my total conversion mod for server and client! If you don't have any experience in XML programming, i can make the updater for you just PM me and i'll do it!(If i have enough time)

~The Person behind Everything~


#10

qwertyjl
  • Location: Maryland
  • Minecraft: qwertyjl

Posted 02 June 2013 - 12:52 AM

I am the Grammar police and I'm arresting GeekGuy96 for improper use of the word "Hopping". The word "Hopping" means "moving by a quick springy leap or in a series of leaps" and you usage is proper for words such as wanting and hoping.
Oh, oh. No more buttered scones for me, mater. I'm off to play the grand piano. Pardon me while I fly my aeroplane.

#11

Lightning3105
  • Location: Some were in the universe...
  • Minecraft: lightning3105

Posted 09 September 2013 - 04:20 PM

View PostDocterDocter, on 08 October 2011 - 04:56 PM, said:

I have written a custom launcher before and have some pointers:
  • It is easier to decompile and modify than write it yourself, the code isn't obfuscated
  • Java is (slightly) more similar to javascript than PHP (if that helps)
  • Change the page for the modded Launcher to one for your server so users know they are getting the modded one
  • If you want, pass minecraft parameters to automatically log into the server
  • To check if it needs to be updated, have a page on the server that returns the latest version - should be easy enough to do in php
  • Give your minecraft.jar a different name (and change the classpath in the launcher)
  • Don't download a whole minecraft.jar from the server, this is generally frowned upon. Instead, use the user/pass provided to download the one from minecraft.net, then download modifications from the server, patch them in and delete any stuff that starts with "META-INF", zip files are reasonably easy to work with in java and jar files are in the same format (look it up, theres loads of stuff about zip files)
Useful. Thanks!

Posted ImagePosted Image

Need a mod-pack with 300+ mods? click the achievement!