With the new Gradle integrated Forge source, comes a new way to setting up your workspace. In this tutorial I will be explaining how you can set up the Eclipse workspace and necessary dependencies to be able to start modding.
This tutorial will be for the advanced version, which means you can make lots of different mods in one Eclipse workspace. Seems good? Let’s start.
First of all, you need to get JDK, Java Development Kit. You might be saying “Hey EMX, I already have Java, that’s what I use to play Minecraft!” Well, JDK and JRE are different. JDK is Java too, but added with stuff to help you develop your Java apps. To get Java Development Kit, you can go here. Download the corresponding version to your computer, and then install it.
After installing that, you need to set your environment variables. To do this, go to Control Panel -> System and Security -> System, and on the sidebar select Advanced system settings. It will open a new window. Click on Environment Variables, and on the System variables box, i.e. the bottom one, add two new variables:
- PATH :: C:\Program Files\Java\jdkx.x.x_xx\bin
- JAVA_HOME :: C:\Progra~1\Java\jdkx.x.x_xx
If you already have your PATH variable, and it is not empty, you can add a semicolon (;), and then the new value.
All done? Great. Now, you can download Eclipse. Eclipse is an IDE, which stands for Integrated Development Environment, which will aid in coding your mod. You can download Eclipse here. Eclipse is released as a package, not an installer, so just extract it to a new folder, and you’re done. You should be left with an “eclipse” folder inside your root modding folder.
Okay, now you need to download Forge itself. Download Forge SRC version (or MDK for newer versions) right here. You always want to get the latest version for modding. Extract this archive to a new folder in the modding folder you created earlier. For clarity I will be naming mine “forge” for this tutorial, so now inside your modding folder, you have two folders, eclipse and forge.
Inside the forge folder, hold shift and right click on the background, and select “Open command window here”. A command prompt will appear, enter the following:
gradlew.bat setupDecompWorkspace eclipse
This is a fairly long process, you’ll want to wait for a few minutes until the command terminates and “BUILD SUCCESSFUL” is shown in the command window.
When done, you can go out of your forge folder into your modding folder, and make a new folder called “workspace”. This will be the folder where you store your mod code.
Okay, from here onwards, we will work in Eclipse IDE, so open that. You will be prompted for the workspace directory, so browse for the “workspace” folder we created before. Eclipse will open, you can close the welcome screen. Click on File -> Import, and select “Existing projects into workspace”. In the “Select root directory” input, browse for the “forge” folder. Enter that, and in “projects” you should see a new project. Select that, and click finish.
Congratulations! You have the dirty work done, and now you can finally start forge modding!
For clarification purposes, I will give you my file system tree:
Forge Modding (main modding folder)
│───eclipse (downloaded from Eclipse site)
│ ├───eclipse.exe
│ └───Other eclipse files
├───forge (contains downloaded forge data)
│ ├───gradlew.bat
│ └───Other forge files
└───workspace (your eclipse workspace)
Eclipse tells me it cannot find JDK even though I followed everything exactly.
JDK is in the java folder and eclipse/forge are in my modding folder. Variables are set correctly but still not working. Any help?
LikeLike
Can you tell me the path you entered for JDK?
LikeLike
um I’m stuck on the command window part it says that it failed to notify the build listener i don’t know what that is or how to fix it.
LikeLike
Where did you place your forge zip? You don’t want to extract forge zip into places like Program Files, cause then gradle won’t have access for read/write there. Try it on the desktop.
LikeLike
../progra~1/… i dont have that folder
LikeLike
it’s alternative of program files
LikeLike
I had to run the command prompt as administrator by going to start then run or Windows Key + R and typing cmd and pressing shift then Enter.. it will ask you to give admin right, say yes.. and then type CD C:\Where every your forge path is
then execute the command.
LikeLike
i dont have the .bat file.
LikeLike
Did you download the correct forge src? (or mdk now)
LikeLike
If it’s the MDK version it would help if you updated that in the guide. Had to come down here to figure out what you’re talking about since the Forge site no longer has any mention of an SRC version.
LikeLike
Of course 🙂
LikeLike
I still cant find the .bat file
LikeLike
Do you not have gradlew.bat in the downloaded forge folder? Are you downloading the correct thing?
LikeLike
when I held shift and right clicked then clicked the open command window here, I typed what you typed and it said that gradlew wasn’t a command. Also do you haft to delete all of the words behind it. Please help
LikeLike
try gradlew.bat
LikeLike
Didn’t work I just read above comment and I don’t have that in the file either I don’t have anything in that folder
LikeLike
You don’t have anything in your folder? You should have forge and all its contents in it.
LikeLike
When I go to the mod folder then the forge folder there’s nothing in it should I redownload it because I couldn’t get the add fly page to load. ps I’m using the 1.7.10 version
LikeLike
You should put forge’s files in the forge folder. Make sure you download forge’s MDK/SRC kit.
LikeLike
When you explain, “You should be left with an “eclipse” folder inside your root modding folder.” – where is this root modding folder and when was it created in this tutorial sequence? Is this not the very first of all the tutorials?
LikeLike
Your root modding folder is the folder that’ll contain everything. forge, eclipse, everything related to this tutorial and/or minecraft modding
LikeLike
The shift right click doesn’t work now.
LikeLike
I got it to work but now it says please set JAVA_HOME variable in your environment to match the location of your java installation. I did the same thing you did and tried where the java folder was located and still didn’t work.
LikeLike
Hi, I got up to it almost saying Build Successful, but instead it said build failed!
plz help
LikeLike
Show me what happened, the text in the console.
LikeLike
All of it or just the end bit
LikeLike
the end is enough most likely
LikeLike
\Desktop\Modding Workspace\Forge>gradlew.bat setupDecompWorkspace eclipse
This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
#################################################
ForgeGradle 2.1-SNAPSHOT-75bb646
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:getVersionJson
:extractUserdev
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:deobfMcSRG SKIPPED
:decompileMc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:decompileMc’.
> GC overhead limit exceeded
* Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.
BUILD FAILED
Total time: 10 mins 48.623 secs
C:\Users\Levi\Desktop\Modding Workspace\Forge>
C:\Users\Levi\Desktop\Modding Workspace\Forge>
C:\Users\Levi\Desktop\Modding Workspace\Forge>
C:\Users\Levi\Desktop\Modding Workspace\Forge>
C:\Users\Levi\Desktop\Modding Workspace\Forge>
C:\Users\Levi\Desktop\Modding Workspace\Forge>
LikeLike
make sure you have java 64 bit installed.
LikeLike
couldn’t do it later but I don’t know where to download Java 64 bit
LikeLike
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
LikeLike
Hey guys! I found a fix. Use this link (http://files.minecraftforge.net/minecraftforge/) instead and download the latest src version. (It’s from 03/21/2015). Then follow the rest of the steps!
LikeLike
Thanks! Will update asap when i get the time. Also, when posting a comment ill need to approve it first, so you’ll not see it the first time. This will happen only once and never again 🙂
LikeLike
I’m having the same issue as Legofan and cannot pass about 44%
LikeLiked by 1 person
show me what happened
LikeLike
I closed it before and restarted it and now it’s stuck at > Building 44% > :decompileMc
LikeLike
are you sure it’s stuck? it can really just take a long time
LikeLike
\Desktop\Modding Workspace\Forge>gradlew.bat setupDecompWorkspace eclipse
This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
#################################################
ForgeGradle 2.1-SNAPSHOT-75bb646
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:getVersionJson
:extractUserdev UP-TO-DATE
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:deobfMcSRG SKIPPED
:decompileMc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:decompileMc’.
> GC overhead limit exceeded
* Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.
BUILD FAILED
Total time: 5 mins 6.554 secs
LikeLike
use java 64 bit
LikeLike
I’m pretty sure I am.
LikeLike
look up your error “gc overhead limit”
LikeLike
Do you have any sort of way I could message you without having to comment here?
LikeLike
PM on reddit, mcforums, or curseforge. Reddit username is emmanuelyohanes, mcforums/curseforge username is the same as this one.
LikeLike
Same issue here as well.
LikeLike
I mean it’s been at 44% for the past 30 minutes almost
LikeLike
I got it to work but now it says please set JAVA_HOME variable in your environment to match the location of your java installation. I did the same thing you did and tried where the java folder was located and still didn’t work.
LikeLiked by 1 person
I’m having the same issue.
LikeLike
I’m having the same problem that Legofan and the other guy are having. I do have Java 64 bit installed.
C:\Users\Hunter\Desktop\Modding Folder\forge-1.8.9-11.15.1.1755-mdk>gradlew.bat setupDecompWorkspace eclipse
This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
#################################################
ForgeGradle 2.1-SNAPSHOT-75bb646
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:getVersionJson
:extractUserdev UP-TO-DATE
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:deobfMcSRG SKIPPED
:decompileMc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:decompileMc’.
> GC overhead limit exceeded
* Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.
BUILD FAILED
Total time: 1 mins 57.855 secs
C:\Users\Hunter\Desktop\Modding Folder\forge-1.8.9-11.15.1.1755-mdk>
C:\Users\Hunter\Desktop\Modding Folder\forge-1.8.9-11.15.1.1755-mdk>
LikeLike
can i see the build.gradle?
LikeLike
Could you e-mail or Skype me so we can figure this out? My e-mail is rockyspone@rocketmail.com and my Skype is huntercat2013
LikeLike
I’m currently figuring this out on my own with someone else with the problem. If I found a fix, I’ll add it to the tutorial.
LikeLike
Alright
LikeLike
are you sure all this is necessary my friend did this with windows 7 and none of this was necessary.
LikeLike
it wont let me because it keeps asking me to move it to the java installation folder and I’ve moved it to all the java things that I can find and it still wont work
LikeLike
Screenshots?
LikeLike
C:\Users\cruel\AppData\Roaming\.minecraft\mods\forge-1.7.10-10.13.4.1558-1.7.10-src>gradlew.bat setupDecompWorkspace eclipse
ERROR: JAVA_HOME is set to an invalid directory: C:\Users\cruel\AppData\Roaming\java
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
C:\Users\cruel\AppData\Roaming\.minecraft\mods\forge-1.7.10-10.13.4.1558-1.7.10-src>
LikeLike