Skip to main content
Version: NG7

NeoGradle Documentation

This is the official documentation for NeoGradle, a Gradle plugin for developing NeoForge and mods using NeoForge.

This documentation is only for NeoForge, this is not a Java, Groovy/Kotlin, or Gradle tutorial.

If you would like to contribute to the docs, read Contributing to the Docs.

Adding the Plugin

NeoGradle can be added using the plugins block in build.gradle by adding the NeoForged maven to the available plugin repositories in settings.gradle:

// In settings.gradle
pluginManagement {
repositories {
// ...

// Add the NeoForged maven
maven { url = 'https://maven.neoforged.net/releases' }
}
}
// In build.gradle
plugins {
// Add the NeoGradle userdev plugin
id 'net.neoforged.gradle.userdev' version '7.0.120'

// ...
}
note

While you can use version ranges for the NeoGradle plugin, it is not recommended to do so, as that may lead to more frequent decompilation and recompilation rounds and possible behavioral changes. You can find the latest NeoGradle version on our Project Listing.

Adding the NeoForge dependency

In order to get the decompiled Minecraft environment and the NeoForge classes in your development environment, you just need to add the net.neoforged:neoforge dependency to a configuration for both a runtime and compile-time dependencies (usually implementation):

dependencies {
implementation 'net.neoforged:neoforge:20.6.43-beta'
}
note

NeoForge's MDK sets the NeoForge version via gradle.properties. You can find the latest NeoForge version on our Project Listing.