Contents

Introduction

In this approach we don't use the build.gradle's from any of the mods. This is all done with manual IDEA project setup. To accomplish this we actually clone a local version of Forge itself.

Setting up Forge

The first thing you need to do is to make a new directory that will host your project and in that directory you clone Minecraft Forge like this:

git clone https://github.com/MinecraftForge/MinecraftForge.git

Now you need to copy all AT files from all your mods inside 'MinecraftForge/src/main/resources/assets'. Or alternatively you can make a single file (like common_at.cfg or something) containing the combination of all your AT's.

Then go inside the 'MinecraftForge' directory and type 'gradlew setupForge'. After a while this will have configured and build forge. This is the *last* time you'll use gradle for anything! No more setupDecompWorkspace or anything. This makes this approach really efficient and fast.

Clone all your mods

Then inside your project directory (the directory that contains MinecraftForge) you clone all the mods you want to use:

Fetching additional dependencies

If you have other dependencies like JEI, WAILA, TOP, ... you have to download the normal release jars from Curse and put them in the 'Workspace/libs' folder.

Creating the IDEA project

Make a normal IDEA java project and in de 'Project Structure' window import all the iml files you just created (MinecraftForge.iml and all your mod imls). Double check that all dependencies are ok:

MinecraftForge needs 'runtime' dependencies on all your mods that you actually want to use at runtime (using this you can leave out mods that you want to have in your project but don't want to use at runtime)

MinecraftForge needs 'compile' dependencies for all mods you put in Workspace/libs

MinecraftForge needs 'provide' dependencies for all mods you put in Workspace/libs because you need them for compilation but that you don't want at runtime

All mods need a 'compile' dependency on MinecraftForge

All mods need a 'compile' dependency on other mods that they depend on

Setting up the run configuration

Create a new 'Application' type run configuration and call it 'Client' (or whatever you like). As working directory you can use Workspace/run or any other directory. I recommend to keep it inside 'run' or some other directory to have a cleaner directory structure. The run configuration should use the classpath of the 'MinecraftForge' module.

Note: you may need to set 'Shorten command line' to 'none'. Forge can have trouble detecting mods otherwise.