isarij Posted March 25, 2013 Posted March 25, 2013 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
isarij Posted March 26, 2013 Author Posted March 26, 2013 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
gotyaoi Posted March 26, 2013 Posted March 26, 2013 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?
isarij Posted March 26, 2013 Author Posted March 26, 2013 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
gotyaoi Posted March 30, 2013 Posted March 30, 2013 As I said before, without seeing your code, it's difficult to advise you. That said, here's how the technic launcher currently does it. Perhaps you can adapt this method to your launcher... thing. https://github.com/TechnicPack/TechnicLauncher/blob/master/src/main/java/org/spoutcraft/launcher/launch/MinecraftLauncher.java#L103-L131
isarij Posted March 30, 2013 Author Posted March 30, 2013 Here is a copy of the source: http://pastebin.com/R4T6xckT
gotyaoi Posted April 1, 2013 Posted April 1, 2013 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.
isarij Posted April 1, 2013 Author Posted April 1, 2013 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?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now