How to publish your mod on Modrinth or CurseForge
Build the release jar with ./gradlew build and take it from build/libs (not the -sources or -dev jar). The mod’s own metadata (fabric.mod.json, neoforge.mods.toml, mods.toml on Forge, or mcmod.info on 1.12.2) must carry the id, a version number, the license, an icon and the dependencies. Use semantic versions such as 1.2.0 and put the Minecraft version in the file name or the version field, not in the mod version. On Modrinth or CurseForge choose the same loader, the Minecraft versions you tested, and the dependencies (Fabric API, for example). Keep a changelog per release.
Works on Minecraft 1.20.1 to 26.3 on NeoForge; Minecraft 1.16.5 to 26.3 on Fabric; Minecraft 1.16.5 to 1.20.1 on Forge; Minecraft 1.12.2 on Forge. Each example was compiled against its loader and version before it shipped in Linen.
- Set the version in gradle.properties and check the metadata file.
- Run ./gradlew build and test the jar from build/libs in a clean game.
- Create the project page: name, summary, description, license, icon.
- Upload the jar with the loader, the Minecraft versions, the dependencies and the changelog.
For each loader and version
Section titled “For each loader and version”The example mod is examplemod in the package com.example.examplemod. Use your own mod id and package.
Fabric and NeoForge 1.20.4 to 1.21.1, NeoForge 1.20.1 to 1.20.2, Fabric 1.16.5 to 1.20.3, Fabric and NeoForge 1.21.2 to 26.3
Section titled “Fabric and NeoForge 1.20.4 to 1.21.1, NeoForge 1.20.1 to 1.20.2, Fabric 1.16.5 to 1.20.3, Fabric and NeoForge 1.21.2 to 26.3”Uses:
fabric.mod.jsonneoforge.mods.tomlversion-numbering
Modrinth and CurseForge read the jar, but their pages ask you for the same facts: loader, Minecraft versions, dependencies.
CHANGELOG.md
# Release Notes
## What changed- Describe the change for players in one line each.
## Needs- Minecraft: the version range the jar was tested on.- Loader and API: say which and from which version.
## Notes- Say what is new for server owners, if anything.Forge 1.16.5 to 1.20.1
Section titled “Forge 1.16.5 to 1.20.1”Uses:
META-INF/mods.tomlversion-numbering
Modrinth and CurseForge read the jar, but their pages ask you for the same facts: loader, Minecraft versions, dependencies.
CHANGELOG.md
# Release Notes
## What changed- Describe the change for players in one line each.
## Needs- Minecraft: the version range the jar was tested on.- Loader and API: say which and from which version.
## Notes- Say what is new for server owners, if anything.Forge 1.12.2
Section titled “Forge 1.12.2”Uses:
@Modmcmod.infoversion-numbering
Modrinth and CurseForge read the jar, but their pages ask you for the same facts: loader, Minecraft versions, dependencies. In 1.12.2 the facts live in the @Mod annotation and in mcmod.info.
CHANGELOG.md
# Release Notes
## What changed- Describe the change for players in one line each.
## Needs- Minecraft: the version range the jar was tested on.- Loader and API: say which and from which version.
## Notes- Say what is new for server owners, if anything.Sources
Section titled “Sources”- https://docs.neoforged.net/docs/1.21.1/gettingstarted/versioning
- https://docs.fabricmc.net/develop/getting-started/
- https://docs.neoforged.net/docs/1.21.1/gettingstarted/modfiles
Related how-tos
Section titled “Related how-tos”- Find out why a mod is not in the mod list
- Share code between Fabric and NeoForge
- Update my mod to a new Minecraft version
- Fix an item name that shows as item.modid.name
- Fix ClassNotFound and NoSuchMethod errors
In Linen
Section titled “In Linen”Linen’s How-tos library has this page too, with the example for your own mod’s loader and Minecraft version. Hover a name in your code and Linen points to the how-tos that explain it. Both are free. Download Linen.