Last week my son went to Minecraft Modding Camp with Planet Bravo. My son made some new characters, blocks and weapons. At the end of the camp he got a Google Drive account with all of his files on it so that he could continue his modding at home. Setting yourself up to do mods isn’t easy. I’m fairly certain that at least 90% of the people who left that camp would need serious assistance in using those files or will never be able to use them.

The day after camp, my son and I went to Alabama so that he could go to Space Camp. During some time I had by myself, I tried to get his mod working. I don’t have any experience making mods, but I have done work on Android with Java and Eclipse. It took me a full two days to get this working, but half of the problem was that the hotel WiFi connection was terrible.

If you’re looking for information on how to set yourself up to do Minecraft Mod development, I would suggest doing the following:

  • Find out what version of Minecraft you want to use
  • Download Eclipse
  • Download Forge for the appropriate version of Minecraft
  • Download Java
  • Run the appropriate scripts
  • If you already have source code, move it into the Forge/src folder
  • Create an Eclipse Workspace
  • Find out what version of Minecraft you want to use

    This may be is the most important step in your journey to doing Minecraft Mods. I didn’t know what version my son’s camp was using so I just downloaded the latest stuff, version 1.8, and when I finally had everything set up, building the mod failed because his code was incompatible with the changes in version 1.8. If you don’t know what to look out for, you’d never know that the version was an issue. I deleted all of the built stuff from 1.8 and reverted to 1.7.10. I’m using a Mac and if you need to delete the stuff built with the build scripts, the files are located at ~/.gradle. I just did a “rm -rf ~/.gradle” to delete all of the built files.

    Download Eclipse

    I actually didn’t do this step because I already had my computer set up for Android development and Eclipse was already installed. It looks like you can download it at https://www.eclipse.org/downloads. I don’t think it was too hard to install.

    Download Forge for the appropriate version of Minecraft

    In the first step, you determined what version of Minecraft that you want to use for modding. Now you need to download Forge for that version of Minecraft. You can do that at http://files.minecraftforge.net. Download the source or src.

    Download Java

    You may already have Java installed on your machine. If not, you need to download the appropriate version for your OS. You can download it at https://java.com/en/download/manual.jsp. After you download Java, install it.

    Run the appropriate scripts

    There’s a page that I used to do most of the setup and that’s at http://www.minecraftforge.net/wiki/Installation/Source. In your terminal or shell, change directory to the Forge directory — the one you downloaded earlier. If it wasn’t decompressed after the download, then decompress it and then change directory into it. The first thing you need to do is to build the Forge mod stuff. You can do that with this command:

    ./gradlew setupDecompWorkspace –refresh-dependencies

    The gradlew tool is inside the Forge folder. This step does a lot of stuff including downloading a lot of files from the internet. Once this command completes successfully, then you can setup the Forge folder with Eclipse with this command:

    ./gradlew eclipse

    This step also takes a while. If that completes successfully then you can move on to the next step.

    If you already have source code, move it into the Forge/src folder

    If you have source code from a pre-existing mod, move it into the Forge/src folder. I did this because my son had his source code from camp.

    Create an Eclipse Workspace

    You’re almost ready to do some modding. Now launch Eclipse. It will ask you which Workspace you want to use. Create a new one by typing in a directory of the new location for your Workspace. Eclipse should open a Workspace window. Go to the File menu and select Import. Within the Import window, turn down “General” and select “Existing Projects into Workspace” and hit Next. For “Select root directory,” click on Browse and select the Forge folder. Check the boxes labeled “Search for nested projects” and “Copy projects into workspace” and then hit Finish.

    Forge should show up in your Workspace now as well as any pre-existing code that you added. Eclipse builds stuff by default, so if you have any errors in your code you will see a red ‘x’ next to any file or folder that has errors. When you’re ready to build and test your mod, do the following commands:

    ./gradlew build

    and

    ./gradlew runClient

    When you run ./gradlew/build, you will either see that the build failed or succeeded. If it failed, you’ll need to find out from the output what went wrong and then try to fix it. When I imported my son’s mod into the original 1.8 Forge environment that I downloaded, I got all sorts of errors such as some “cpw” imports couldn’t be resolved, some texture functions weren’t found, etc. After messing with those for a while, I realized I was on the wrong version. I did manage to get it all compiling on 1.8, but it seems like the texture handling was quite different — in 1.7 setting textures was done in the code whereas in 1.8 it’s done in JSON resource files and loaded into the code. I didn’t want to mess up his code so I just reverted to 1.7 and it seems to be fine.

    Good luck!