By Geertjan-Oracle on Apr 25, 2015
Minecraft Forge is a common open source API focused on allowing mods to be created without the need for the source code of Minecraft to be edited.
Happy to report that Minecraft Forge works seamlessly in NetBeans IDE. Take the following steps:
- Download and unzip Forge 1.8 from http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.8-220.127.116.111/forge-1.8-18.104.22.1681-src.zip.
- In the folder where you unzipped the above, run "gradlew setupDecompWorkspace --refresh-dependencies".
- Start NetBeans IDE (I am using NetBeans IDE 8.0.2). Go to Tools | Plugins and install "Gradle Support".
- Go to File | Open Project. Browse to the folder where you unzipped the above, which will now be recognized as a Gradle project. Open the project. Wait a moment for the Gradle plugin in NetBeans IDE to figure out the structure of the Gradle project you have opened.
- Right-click the Gradle project and go to Tasks | run | runClient. After a moment, Minecraft starts up!
Next, you'll want to map the "runClient" task to the "Run Project" command in NetBeans IDE, so that running your mods is as simple as pressing F6. Right-click the project and choose Properties. The Project Properties dialog opens:
Click "Manage Built-In Tasks" above. Now look for "Run" and then type "runClient" in the Tasks field, as shown below:
Click OK. Press F6 (which is mapped by default to "Run Project") and the "runClient" task will be run!
Congratulations to Attila Kelemen from Hungary, for making such a nice NetBeans plugin for Gradle.
Now mod away!