My instructions are based on this post, but I had to update several aspects of them for Forge 1.7.2: http://www.minecraftforum.net/topic/1889606-162-minecraft-forge-modding-1-the-eclipse-workspace/
You need to download the following:
- Eclipse Standard from http://www.eclipse.org/downloads/
- Forge src 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 link 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, for example C:\MinecraftForge
- Open a cmd window
Use cd to change directory to the forge folder, e.g:
Now run this command (followed by the second gradlew command, see below):
gradlew 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: