This project provides a Gradle project template that can compile mods for NeoForge. This project does not require any third party libraries or dependencies.
This guide will show how to import the NeoForge Template into IntelliJ IDEA. The setup process is roughly equivalent to setting up the MDK.
- Clone or download this repository to your computer.
- Configure the project by editing the
gradle.properties
file. - Configure the
build.yml
andpublish.yml
files with the proper name and link. - Configure the mod id in the
build.gradle
file in the mods block. - Open the template's root folder as a new project in IDEA. This is the folder that contains this README file and the gradlew executable.
- If your default JVM/JDK is not Java 21 you will encounter an error when opening the project. This error is fixed by going to
File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM
and changing the value to a valid Java 21 JVM. You will also need to set the Project SDK to Java 21. This can be done by going toFile > Project Structure > Project SDK
. Once both have been set, open the Gradle tab in IDEA and click the refresh button to reload the project. - Configure the packages and classes in the
src
folder to match your mod. - Open your Run/Debug Configurations. Under the Application category there should now be options to run NeoForge projects. Select one of the client options and try to run it.
- Assuming you were able to run the game in step 7 your workspace should now be set up.