If you're using IntelliJ, I assume you have at least some experience, so I will skip the basic parts.
1. Make sure your 'Environment Variables' are all setup. (Most importantly, JAVA_HOME)
2. Download Minecraft Forge 'MDK' from here. (Pick the version you want to mod on)
3. Unzip and extract to a folder of your choice.
4. Open up Command Prompt and cd it to the root of your MDK folder.
5. Type gradlew setupDecompWorkspace and wait until you see 'BUILD SUCCESSFUL' (If it fails, try it again)
6. Type gradlew setupDevWorkspace ideaModule and wait until you see 'BUILD SUCCESSFUL'(Don't close your Command Prompt yet,we'll need it later)
7. Now start up IntelliJ and [Create New Project -> Empty Project] OR just import build.gradle as a project. (Located in your MDK root)
8. Click 'Ok' and a window will pop up. Click on the partially blue button on the top right side that says 'Project Structure' and go to 'Projects' tab.
9. Choose your Project SDK. Mine would be 1.8(or whatever's set in your JAVA_HOME).
10. Under Project Language Level, pick 'SDK Default'.
11. Next, go to 'Modules' tab and click on the Green '+' symbol and click on 'Import Module'.
12. Look for Forge.iml or whatever iml file you have in your Forge MDK folder and import that.
13. If there are any pop-ups, do whatever is said otherwise close IntelliJ.
14.Type gradlew genIntellijRuns (in CMD)and wait for it. Once it's done, launch IntelliJ IDEA again.
*IMPORTANT* If you're running IntelliJ 2016 and above, under the tab along with 'Minecraft Client' and 'Minecraft Server', click on 'Edit Configurations'.
Look for 'Use classpath of module' and change it to the one that looks like 'xxx_main'
Click on 'Apply' and close it!
Test via clicking the arrow button on top right.
If it launches Minecraft, you're good to go !!
Also, more information can be found at the official Forge documentation here.
Thanks so much for putting this together. I used to write mods years ago and was not looking forward to making eclipse work again, found a number of people suggesting IntelliJ and decided to try it since I found your very simple walk through. I let it run while making dinner and had it all set up.
The only hickups: It failed twice during decomp, first because I hadn't increased the amount of memory for java on this machine (but I had on my other one, I just forgot), and my connection dropped and I spent some time trying to figure out why the build failed before realizing it was my connection. So, if the build fails during the download, check those two things.
* What went wrong:
A problem occurred evaluating root project '1.10.2 mods'.
> Failed to apply plugin [id 'net.minecraftforge.gradle.forge']
> Unable to obtain url (http://export.mcpbot.bspk.rs/versions.json) with etag!
* 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: 23.485 secs
I tryed to find solutions by googling but did not find one, would anyone help me with this? The version is forge-1.10.2-12.18.3.2185-mdk
i honestly don't know what wen't wrong there (assuming that you already tried redownloading), but i got used to set up my workspace directly in intellij. simply follow this tutorial, maybe this works:
If you're using IntelliJ, I assume you have at least some experience, so I will skip the basic parts.
1. Make sure your 'Environment Variables' are all setup. (Most importantly, JAVA_HOME)
2. Download Minecraft Forge 'MDK' from here. (Pick the version you want to mod on)
3. Unzip and extract to a folder of your choice.
4. Open up Command Prompt and cd it to the root of your MDK folder.
5. Type gradlew setupDecompWorkspace and wait until you see 'BUILD SUCCESSFUL' (If it fails, try it again)
6. Type gradlew setupDevWorkspace ideaModule and wait until you see 'BUILD SUCCESSFUL'(Don't close your Command Prompt yet,we'll need it later)
7. Now start up IntelliJ and [Create New Project -> Empty Project] OR just import build.gradle as a project. (Located in your MDK root)
8. Click 'Ok' and a window will pop up. Click on the partially blue button on the top right side that says 'Project Structure' and go to 'Projects' tab.
9. Choose your Project SDK. Mine would be 1.8(or whatever's set in your JAVA_HOME).
10. Under Project Language Level, pick 'SDK Default'.
11. Next, go to 'Modules' tab and click on the Green '+' symbol and click on 'Import Module'.
12. Look for Forge.iml or whatever iml file you have in your Forge MDK folder and import that.
13. If there are any pop-ups, do whatever is said otherwise close IntelliJ.
14.Type gradlew genIntellijRuns (in CMD)and wait for it. Once it's done, launch IntelliJ IDEA again.
*IMPORTANT* If you're running IntelliJ 2016 and above, under the tab along with 'Minecraft Client' and 'Minecraft Server', click on 'Edit Configurations'.
Look for 'Use classpath of module' and change it to the one that looks like 'xxx_main'
Click on 'Apply' and close it!
Test via clicking the arrow button on top right.
If it launches Minecraft, you're good to go !!
Also, more information can be found at the official Forge documentation here.
Cheers and enjoy modding!!
dumbness is real: i accidently tried to build it with the gradle compiler . to all linux users: use
Thanks so much for putting this together. I used to write mods years ago and was not looking forward to making eclipse work again, found a number of people suggesting IntelliJ and decided to try it since I found your very simple walk through. I let it run while making dinner and had it all set up.
The only hickups: It failed twice during decomp, first because I hadn't increased the amount of memory for java on this machine (but I had on my other one, I just forgot), and my connection dropped and I spent some time trying to figure out why the build failed before realizing it was my connection. So, if the build fails during the download, check those two things.
I have problems with setting up forge mdk. When I run cmd at my mc mods folder it ends up with this:
E:\Mincraft Mods\1.10.2 mods>gradlew setupDecompworkspace
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
Etag download for http://export.mcpbot.bspk.rs/versions.json failed with code 500
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\Mincraft Mods\1.10.2 mods\build.gradle' line: 10
* What went wrong:
A problem occurred evaluating root project '1.10.2 mods'.
> Failed to apply plugin [id 'net.minecraftforge.gradle.forge']
> Unable to obtain url (http://export.mcpbot.bspk.rs/versions.json) with etag!
* 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: 23.485 secs
I tryed to find solutions by googling but did not find one, would anyone help me with this? The version is forge-1.10.2-12.18.3.2185-mdk
i honestly don't know what wen't wrong there (assuming that you already tried redownloading), but i got used to set up my workspace directly in intellij. simply follow this tutorial, maybe this works:
It turned our their server was down yesterday, now everything works fine.
Updated with more information.
i didnt use xxx_main (dumb me)
I tried the what the post said and its not working. Minecraft does start etc. but the mod doesn't get loaded along.
Btw under edit configuration the build matching xxx_main was selected by Default.