Platforms
Forge mods
Forge (and NeoForge) mods with Codexe. Versions, what to put in the request, the ForgeGradle build, mods.toml and common issues.
Updated
Forge is the long-established mod loader with a large event bus and registry system. Codexe generates a complete Gradle project using ForgeGradle.
#What to put in the request
- Minecraft and Forge version: "Forge 1.20.1". Without one, Minecraft 1.20.1 with Forge 47 is used.
- NeoForge: if you want NeoForge (1.20.2+), say so explicitly. Codexe recognises NeoForge projects and builds them with the matching Gradle setup.
- Content: items, blocks, entities, creative tabs, recipes, configs, and whether anything is client-side.
A Forge 1.20.1 mod: adds a "Copper Hammer" tool (durability 250) that mines a 3x3 area of stone-type blocks. Crafted from copper ingots and sticks. Registered with DeferredRegister, added to the Tools creative tab, English lang file.#What Codexe generates
build.gradle,gradle.propertiesandsettings.gradlewith the right ForgeGradle and Gradle versions.META-INF/mods.toml(orneoforge.mods.toml) declaring the mod id, loader range and dependencies.- The
@Modentry class,DeferredRegisterregistries and event subscribers. - Assets: lang, models, placeholder textures.
#Build and verification
The mod is compiled before it's Ready, and the JAR must contain mods.toml, neoforge.mods.toml or mcmod.info. Java is chosen from the Minecraft version (17 before 1.20.5, 21 from 1.20.5). The first build downloads the Forge toolchain and can take several minutes. Mod builds stop after 10 minutes.
#Common issues
| Symptom | Likely cause |
|---|---|
| "Mod file … needs language provider javafml" | The loader version range in mods.toml doesn't match your Forge version. State your exact Forge version. |
| Registry errors at startup | Objects registered outside DeferredRegister. Ask the chat to move them. |
| Works in singleplayer, crashes on a server | Client-only classes referenced from common code. |