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".
For Linux users ensure you have Astyle and Wine installed. This is required for the patches to apply correctly.
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.
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 3: Once you have a command window up in the folder that the downloaded material was placed, type gradlew.bat setupDevWorkspace --refresh-dependencies.
The time it takes to decompile properly can vary on the hardware.
Less than ten minutes is average, but there have been reports of decompilation taking over an hour. Why not get something to eat while this happens?
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.
Common Errors and General Warnings
Forge includes a snapshot of the MCP mappings. The mappings may not be the most current, but you must use the provided mappings in order for the patch files to work together.
You do not need to run any of the MCP scripts to decompile Minecraft and install Forge. Forge's install.sh will do it for you.
KEEP the recompile and reobfuscate scripts! You will need them to distribute your mod.
Also, keep the update scripts around (the reasons are obvious).
If you see an error which looks like this
WindowsError: [Error 5] Access is denied: '<..>\\mcp72\\eclipse'
Try deleting the eclipse directory within your MCP directory, and then run the install script.
Please ensure that Eclipse is closed before installation.
6,000/7,000 Errors Upon Opening Eclipse
You might be using one of the revisions of Forge that borks up /mcp/eclipse. Move /forge/fml/eclipse to /mcp/eclipse or get the latest version of Forge and install that instead.
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.
- Where all forge related files are found. The folder created during extraction. Contains all the readmes and
- /forge/install.sh or /forge/install.cmd
- The installation script for installing Forge.
- The location of the Minecraft Coder Pack tools.
- The pre-built workspace for Eclipse IDE users.
- The location of your source files
- /forge/mcp/recompile.sh /forge/mcp/reobfuscate.sh (.bat for Windows)
- Scripts that get your mod from source code into a releaseable state.
- The location of your class files after running reobfuscate.sh (.bat for Windows)