build minecraft forge development environment with IDEA

Table of Contents

build IDEA environment

prepare forge source

download src zip file

download from MinecraftForge, i download forge-1.8-11.14.1.1411-src.zip

project structure

make a directory, eg. ~/project/forge-1.8

then, unzip forge-1.8-11.14.1.1411-src.zip to ~/project/forge-1.8

now, directory structure like this:

forge-1.8
 ├── build.gradle
 ├── CREDITS-fml.txt
 ├── eclipse
...    

prepare gradle

./gradlew setupDecompWorkspace  # this step will take a long time
./gradlew ideaModule

import

Open IDEA Select 'import project' Navigate to your workspace and click on the build.gradle.

Once IDEA finishes importing the project, close IDEA.

In your command window, run:

./gradlew genIntellijruns

For a full tasks list, type:

./gradlew tasks

done

The final step is the easiest: open your IDE.

new Mod settings

eg. create a mod named TestMod

File->New->Module->Java

File->ProjectStructure->Modules->TestMod->Dependencies->Add->Module Dependency->forge-1.8

Author: sanye

Exported At 2021-02-24 Wed 23:51. Created by Emacs 26.1 (Org mode 9.4)