My 8 year old is an enthusiastic MineCraft player. It’s basically modern day Lego without the expense of buying thousands of dollars worth of plastic blocks. Over the last few months she has built up a fairly impressive town and is now approaching the point where she wants to do more. The various MineCraft video podcasts she watches on YouTube opened her eyes to the world of modding.
We installed a few pre-built mods for her to play with, but things have now gotten to the point where she wants to create her own. I’m still not clear on whether she wants to actually learn Java and cut code for the mod, as she may be perfectly content scribbling instructions for me in her notebook. Regardless, I thought it would be a good idea to start collating resources on how to actually go about modding MineCraft.
Before you start anything, make sure you’re familiar with where MineCraft stores it’s application data; things like your save files etc. On a Windows 7 machine it generally uses %AppData%/.minecraft. Be sure to back this folder up before doing anything funky with your MineCraft install, lest you end up with a bunch of corrupted save files. You can always replace the MineCraft executable, but it’s a bit harder to re-create the hours of work you may have spent building your own in-game version of the USS Enterprise:
Firstly, you’ll need a copy of the MineCraft Coder Pack (MCP). Essentially MCP is a Java toolkit that decompiles the MineCraft .JAR files (the packaging format used by MineCraft to wrap up all the Java class files, metadata and resource files needed by the application in a format suitable for distribution) allowing you to edit and recompile the app. It also has a bunch of helper classes, batch files and a bunch of other fun stuff to make the experience more pleasant.
Next you’ll want to check out the list of MineCraft Modding Tutorials on the MineCraft forums. If you scroll down in that forum post you’ll see an excellent guide to setting up Eclipse to use the MineCraft Coder Pack. My 8 year old appreciated this as she has never seen Eclipse before; her only development experience so far has been with Python using IDLE and LOGO using KTurtle.
The list also contains some basic tutorials that get you started with cutting code against the MineCraft codebase. There are more tutorials like this on the tutorials section of the MCP Wiki
There are also a number of options for playing around with MineCraft that don’t involve cracking open Eclipse. Be sure to check out the following:
- MCEdit, a MineCraft Map Editor
- The MineCraft Wiki article on Skins has some great info on modifying player and NPC skins. It also has quite a few sample skins and links off to a few external skin repositories. This is really handy for getting your head around what a MineCraft skin needs to look like before creating any of your own.
- INVedit is a MineCraft inventory editor that my 8 year old is currently using to give herself all the items she needs to create a world of her own.
- The MineCraft Wiki Mod page has a list of third party mods as well as links to various Mod managers that let you install mods without cracking open the .JAR file and recompiling it yourself. As with all development endeavors, it’s worth checking to make sure that the feature you’re trying to add hasn’t already been written by someone else, making this a good place to check before you open up Eclipse.
- The Single Player Commands Mod gives the player access to commands that add a whole lot of functionality to what you can do in-game. Here’s a cool explanation of what the mod can do:
- You can download save files (maps) that other people have created or distrubute your own.
Something cool that’s mentioned on the MineCraft Wiki is the possibility of server-side Lua scripting coming to MineCraft. Notch, creator of MineCraft, mentioned it in a post way back in 2009, so I’m not sure if it’s still on the cards. Still, he does mention that it will be coming during the beta, and MineCraft has only recently reached beta. If they do introduce server-side scripting then I’d imagine the barrier to entry for MineCraft modding would be significantly reduced. Still, for now it’s a good excuse to teach my 8 year old some Object Oriented Programming concepts which she hasn’t been exposed yet. Just a pity it has to be in Java.