Jump to content

Change minecraft.jar directory for modpack


isarij

Recommended Posts

Hello,

How can I change the filepath for minecraft.jar (bin folder and everything). I am making a custom modpack for my server and want my players to be able to have the modpack and vinilla minecraft installed, but only have to download my launcher. I need it to be multi-platform, so it cant have batch files.

Thanks,

Isaac

Link to comment
Share on other sites

I'm probably going to sound like a n00b... I have know idea what a "spoutcraft launcher fork" is, let alone how to make one!

How would one go about making a fork. (Not cutlery!)

Thanks,

Isaac

Edit:

I defiantly want to keep my custom launcher I made, if that's possible
:(
Link to comment
Share on other sites

First, stop signing your posts. It's against the rules.

Second, spoutcraft is what the technic launcher is built on. It's a bit easier to just fork (ie. change some code and redistribute) that than to roll your own launcher.

Third, as you already have made your own launcher apparently, there's no way we have any idea how you've coded it, so we can't easily tell you how to add a particular feature. Got a publicly accessible repo or the launcher itself we could look at?

Link to comment
Share on other sites

At the moment it is just a window with two text boxes, a few labels and a button that says "login". I have setup a class (the program only consists of three classes at the moment, as I only started making it yesterday) that connects to login.minecraft.net and reads the content given, then depending on the content, it will show a popup with a message depending on the webpage output. If the login data is correct, it calls a method that will hopefully be able to launch minecraft. otherwise it will prompt you to login again.

Sorry for signing my replys, I'm not really used to using forums :)

Link to comment
Share on other sites

Bumping: also not encouraged around here. I don't post every day, hold your horses.

As to your code, before you think about reflection at all, does what you have even compile? Because it looks like it won't, what with the two launch methods in your Main class, among other things.

Link to comment
Share on other sites

Wait... What? Why are there two launch methods? But yes It does compile, also i removed all of the imports to make it look nicer. It is now fixed.

Also in the link you gave me, I found this bit of code:

Class<?> clazz = loader.loadClass("net.minecraft.client.Minecraft");

I know that "net.minecraft.client.Minecraft" is part of Minecraft, but how exactly do I link it to minecraft, if that makes any sense whats so ever. Do I have to add Minecraft.jar to my resources?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...