To prepare for MineVention, a handful of you will be making Java mods. This is the first of the posts showing you what to do.
You need to download the following:
- Eclipse Standard from http://www.eclipse.org/downloads/
- Forge SRC for 1.7.2: http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.2-10.12.0.999/forge-1.7.2-10.12.0.999-src.zip
- Eclipse should include Java, but if it does not, you may need to download the Java Development Kit (JDK) SE (standard edition) from http://java.oracle.com (note: don’t just download the JRE, Java Runtime Environment, as you will be developing Java programs, not just running them)
The steps to install the Forge Java modding environment are below.
To install Eclipse:
- Eclipse does not have an installer: you just unzip and run it.
- Create a folder C:\Eclipse, copy your Eclipse zip file into it, and extract it
- In the sub-folder, find Eclipse.exe: make a shortcut to it on your desktop
- Start it up and make sure it works
- We can write a first “Hello World” program: see below.
To install Forge: http://www.minecraftforge.net/wiki/Installation/Source
- Extract the Forge .zip file to a new folder -> C:\Forge
- Open a Command Prompt/CMD window
In that CMD window, navigate to C:\Forge. Use cd .. a few times to go up a level to C:, and cd Forge to go to the Forge folder.
Now run this command (followed by the second gradlew command, see below):
gradlew.bat setupDecompWorkspace –refresh-dependencies
Let the installer download all necessary files. This takes 20-30 minutes. Watch out for errors!
- It will download MCP (Minecraft Coders Pack) automatically, as well as libraries
- It will then download assets. These are non-code elements of Minecraft, e.g. language files, music files, record audio, sounds and more. These are now stored in a folder called “assets” under the “.minecraft” folder.
- Finally, it will begin decompiling the Minecraft source code. When finished, you will have a new folder inside your “forge” folder called “mcp”.
- Finally, create an Eclipse workspace for Forge with this command:
Start up Eclipse and select the workspace that Forge created, in the Eclipse folder under Forge:
Note: if the workspace is empty, make sure that you ran the command gradlew eclipse and that you selected the correct folder.
Press the green Run icon: you should see messages in the Eclipse console window and Minecraft will launch and will initially have 3 mods.