Installing Minecraft Forge is a simple process. Follow these steps exactly, and you should be fine. You should also read all of the instructions before beginning, including the common errors and warnings.
You MUST have the JDK installed
If you do not, install Java SDK Standard Edition (short JDK). Then, add the paths to your JDK and JRE bin folders to the Environment Variable PATH.
Example for Windows users of what you have to add to the variable (entries are seperated by ";" ):
C:\Program Files\Java\jdk1.6.0_24\bin;C:\Program Files\Java\jre6\bin
You should also be able to use Java 7 (JDK 1.7), but doing so means that all users of your mod must also be using Java 7. (If using Eclipse, you can still use Java 7 and compile for Java 6. To do this, choose the Compiler compliance level to 1.6 by going to Window->Preferences->Java->Compiler. If you only want to do this for your minecraft project, make sure you select the Configure Project Specific Settings... and only change the settings there.)
Step 1: Download a fresh copy of the recommended 'src' build. You can also try the latest build, but it may be buggy.
After that has downloaded it, extract it to a folder wherever you wish.
It should unpack, and you should see these files, or their future counterparts.
Step 2: For windows, you hold down shift, and right click, then select "Open command window here".
If you have "Permission Denied" errors on Linux/Mac OS, use the terminal.app (found in utilities) to navigate your way to your forge directory using cd and use.
Step 3: Once you have a command window up in the folder that the downloaded material was placed, type gradlew.bat setupDecompWorkspace --refresh-dependencies.
It takes a varying amount of time, less than ten minutes is average. Why not get something to eat while this happens?
This will do quite a lot of tasks:
- Download most requirements (Minecraft, MCP(Mod Coder Pack), Java Libraries, Gradle, Forge, and FML)
- Set up Forge, with MCP and Gradle.
Step 4: After all that finished, you're left with a choice.
What IDE(Intergrated Developement Enviroment) do you use?
Eclipse or Intellij?
Because now you simply run the following command: gradlew.bat <your IDE> eg, I use Eclipse, I pass it eclipse, like so: gradlew.bat eclipse
The two different versions of the parameters, are as follows:
Step 5: The final step is the easiest, simply fire up your IDE, and point its workspace at the eclipse folder where you extracted it all.
Using an IDE
- Eclipse for Eclipse IDE users.
- NetBeans for NetBeans users.
- Forge Development in IntelliJ IDEA for IntelliJ IDEA users.
Forge Directory Structure
If it's not listed here, the you probably aren't going to need to care about the directory/file.
- The root directory for dealing with builds.
- Just the compiled version of your mod.
- Arguably, one of the most important folders, this folder is where the builds are compiled, and reobfuscated, and zipped into a .jar.
- The location your resources end up while being compiled into the final build.
- The pre-built workspace for Eclipse IDE users.
- Just the gradle wrapper, the files that enable awesome build automation.
- The location of the Minecraft Coder Pack tools.
- The folder that the source code will be located when you set up eclipse, and push builds.
- The location of your class files after running reobfuscate.sh (.bat for Windows)