Set up a Forge mod
Checked against Linen’s templates on 2 November 2026. Every value on this page is copied from the template files
themselves: gradle.properties, build.gradle, settings.gradle and the Gradle wrapper.
What New mod makes
Section titled “What New mod makes”The Gradle plugin is ForgeGradle, net.minecraftforge.gradle, in every row. Gradle runs on the same Java the mod
compiles for.
| Minecraft | Java | Gradle | ForgeGradle | Names in code | Forge builds offered |
|---|---|---|---|---|---|
| 1.12.2 | 8 | 5.6.4 | 3.+ |
MCP snapshot 20171003-1.12 |
14.23.5.2861 and newer |
| 1.13.2 – 1.15.1 | 8 | 4.9 | 3.+ |
MCP snapshot for the version | |
| 1.15.2 – 1.16.4 | 8 | 4.10.3 | 3.+ |
MCP snapshot for the version | 1.16.1: 32.0.72 and newer |
| 1.16.5 | 8 | 7.3.3 | 5.1.+ |
Mojang names | 36.1.66 to 36.2.40 |
| 1.17.1 | 16 | 7.2 | 5.1.+ |
Mojang names | |
| 1.18.2 – 1.20.1 | 17 | 8.8 | [6.0,6.2) |
Mojang names | 1.18.2: 40.2.33 and newer; 1.19.2: 43.3.5 and newer; 1.19.4: 45.2.4 and newer |
| 1.20.2 – 1.20.3 | 17 | 8.4 | [6.0.16,6.2) |
Mojang names | |
| 1.20.4 | 17 | 8.12.1 | [6.0.16,6.2) |
Mojang names | |
| 1.20.6 – 1.21.3 | 21 | 8.12.1 (8.7 for 1.21) | [6.0.24,6.2) |
Mojang names | 1.20.6: up to 50.2.6; 1.21.1: up to 52.1.12; 1.21.3: up to 53.1.9 |
| 1.21.4 – 1.21.9 | 21 | 8.12.1 | [6.0.36,6.2) |
Mojang names | 1.21.4: up to 54.1.14; 1.21.5: up to 55.1.8; 1.21.8: up to 58.1.16 |
| 1.21.10 | 21 | 8.12.1 | [6.0.46,6.2) |
Mojang names | up to 60.1.8 |
| 1.21.11 | 21 | 9.5.0 | [7.0.3,8) |
Mojang names | 61.0.11 and newer |
| 26.1 and newer | 25 | 9.3.1 on 26.1 and 26.1.1; 9.5.0 on 26.1.2 and 26.2; 9.7.1 after | [7.0.17,8) |
Mojang’s names, built into the game |
- Up to 1.17.1 the plugin is loaded the old way, with
buildscript { dependencies { classpath ... } }andapply plugin: 'net.minecraftforge.gradle'. From 1.18.2 it is in theplugins { }block. - Mojang names are
mappings channel: 'official', version: <minecraft version>(on 1.18.2 – 1.21.10 throughmapping_channelandmapping_versioningradle.properties). On 26.1 and newer there is nomappingsline. - “Forge builds offered” are the builds New mod lists for that version. Where it says “up to”, newer builds of that Minecraft version don’t fit this template, so New mod doesn’t list them.
- Every project gets an access transformer at
src/main/resources/META-INF/accesstransformer.cfg, and a mixin config (<modid>.mixins.json) on every version except 1.13.2 – 1.15.2. On 1.12.2, mixins come through MixinBooter.
Commands
Section titled “Commands”| Task | Command |
|---|---|
Build the mod jar (in build/libs/) |
./gradlew build |
| Start the game with your mod | ./gradlew runClient |
| Start a test server | ./gradlew runServer |
| Run data generation (1.14.3 and newer) | ./gradlew runData |
| Run game tests on a server (1.18.2 and newer) | ./gradlew runGameTestServer |
The run names come from the runs { } block in build.gradle: client and server on every version, plus data from
1.14.3 and gameTestServer from 1.18.2. Forge’s docs list the matching run* tasks
(Forge: Getting Started). On Windows, use gradlew.bat or
.\gradlew.
In Linen
Section titled “In Linen”- New mod writes these projects. Pick a loader and a version; Ctrl or Shift and a click adds more, so one mod can target several versions or loaders at once.
- Linen installs the Java version the project needs, including Java 8 for old Forge.
- Play the game runs the dev client with the Game Log; if it crashes, Crash Doctor says why.
- Linen Check reads registrations, models, loot tables, names, mixins and the build, and names the file and the fix.