-
Notifications
You must be signed in to change notification settings - Fork 20
Home
So you want to write your own launcher, huh? Then you're on the right place. Let me introduce myself first. My name is Tomsik68 and I'll be your guide on this journey. Before writing a software, you should think about what it should do. Here are some things you might want to include in your launcher:
- Login to minecraft services
- Change minecraft versions
- Automatically extract worlds(ZIPs,RARs)
- Automatically install texture packs & resource packs
- Install mods
- Ping minecraft servers
- Change RAM for minecraft
- Game console for developers
- Run minecraft :)
- Features users request
MCLauncher-API will try to help you with most of these tasks.
Wise words from wiki author:
This wiki is terribly structured. Use the sidebar to help yourself :)
So as we have these features written, we should now tell the order. I chose the easiest order: Do it as we do it while launching minecraft: First, I'll work on login, then remember profile, version list, version install, install libraries, run minecraft, install textures & resources,...
Here's a little list of what's done([x] = done,[>] = working on it, everything else = not even started):
- Login
- Profile Save/Load
- Download resources
- Download & install libraries
- Launching MC
- RAM changer
- Modding interface
- [>] Ping servers
- Forge compatibility
- Play offline
- User-requested features will appear here...
You may have noticed some features had gone away, but that's because this project was at its beginning an attempt to create a launcher. Then, I realized I need more than one launcher, so I changed it to an API and began documenting various aspects of minecraft launcher. It's really fun though :)
- Login legacy + yggdrasil
- Check version lists
- Download Minecraft along with resources and libraries
- Launch Minecraft
- Use mods that work by being injected to the classpath on versions >=1.6
I can't create the entire launcher on my own, so I'll be using some libraries, which I'll list here:
- JSON-smart 1.1.1 - A small & fast JSON parsing library - http://code.google.com/p/json-smart/
- JOptSimple 4.5 - Command line argument parsing library - http://pholser.github.io/jopt-simple/
- flow-nbt 1.0.0 - reading/writing NBT files - https://github.com/flow/nbt
This wiki is split up into 2 parts: Documentation and API Guides.
The documentation part is for those who want to know how the API works or rewrite it to a different language. I basically reverse-engineered the minecraft launcher and wrote that.
API Guides part is for people who are not interested in how the API works, but they want to learn to work with the API.
A little note: on the right side, you can see a list of pages on the wiki. This list can be used to navigate, but wiki was written in a way so that you shouldn't need it. It's there just in case you're looking for something specific...
This is for people who want to create their own launcher
API Guides are located here
Javadocs are handy. If you want to use them, they're available from maven repository, but also online here(select your version) :
- 0.3.1: https://tomsik68.github.io/mclauncher-api/javadoc/0.3.1
- 0.3: https://tomsik68.github.io/mclauncher-api/javadoc/0.3
- 0.2.1: https://tomsik68.github.io/mclauncher-api/javadoc/0.2.1
I'll be documenting these segments of work as I'll work on them, so others will be able to learn from my resources.
Sections currently documented(the sections are sorted depending on which is happening first in the launcher):
- Check status of login servers
- New login(Yggdrasil)
- New login information saving
- Working directory location
- What you need to know before installing minecraft
- Downloading minecraft.jar from Minecraft.Download
- Minecraft >=1.6 resources
- How to run Minecraft >=1.6
For a little while, there used to be two different systems of running minecraft. The "old" launcher for Minecraft <=1.5.2 and new launcher for versions >=1.6. I documented both of these, but most of the old system is gone today. I decided to keep the pages here on the wiki and separate them from the rest of the wiki.
You can find list of deprecated concepts here
- JSON viewer(formats JSON string) - http://jsonviewer.stack.hu/
- Bytecode-viewer(decompiles a JAR using 3 decompilers) - https://github.com/Konloch/bytecode-viewer
If you know more, you can feel free to fork the repo, add your own knowledges to wiki or improve on the code. After that, you can even pull-request the changes and I'll most likely accept them :)
Feel free to open an issue to ask RELATED questions. Before asking a question, please spend some time searching the whole issue list - https://github.com/tomsik68/mclauncher-api/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+is%3Aopen
There's an official gitter channel for mclauncher-api. You can stop by whether you need some help with your launcher, want to help others, want to chat about the project in general or just like to stay idle in random chat rooms!
API has been around for short time, but it's already possible to write a working launcher using it! If you're looking for launchers created with this, look at our Launcher List Page
If you want your launcher to be listed, toss me an e-mail to [email protected] or edit the wiki page yourself :)
-
Find your home - Where is the
.minecraft
folder?
- MinecraftLauncherBackend & GlobalAuthenticationSystem - Logging in, Updating, Running the game
- Login - Logging in with password or session ID
- Profile I/O - Saving/Loading login credentials
- LAN Server Discovery - Discovering servers which are running on LAN
- Loading saved servers - Loading servers from servers.dat