Getting Started (for Minecraft 1.20.2 and up) - Fuzss/forge-config-api-port GitHub Wiki
The recommended way of adding Forge Config Api Port to your project is via Gradle in your build.gradle file.
In the Kotlin snippets make sure to replace <modVersion> with the version of Forge Config Api Port you intend to use. Version numbers have a pretty simple form such as 8.0.0 (for Minecraft 1.20.1) or 21.11.0 (for Minecraft 1.21.11).
All available versions can be viewed on CurseForge & Modrinth.
Forge Config Api Port is available as multiple distributions depending on the mod loader / type of project you want to use it on. You will not need to depend on Forge Config Api Port on the mod loader the config system is ported from. The table below shows what config system (either NeoForge's or Minecraft Forge's) is available in which distribution.
| Project Type | Distribution Name | NeoForge Api | Minecraft Forge Api | Namespace |
|---|---|---|---|---|
| Common | forgeconfigapiport-common-neoforgeapi |
✅ | ❌ | Named |
| Common | forgeconfigapiport-common-forgeapi |
❌ | ✅ | Named |
| Fabric | forgeconfigapiport-fabric |
✅ | ✅ | Intermediary |
| NeoForge | forgeconfigapiport-neoforge |
❌ | ✅ | Named |
| Forge | forgeconfigapiport-forge |
✅ | ❌ | Srg |
So, i.e. if you want to use the NeoForge api for your project, you will need to:
- depend on
forgeconfigapiport-common-neoforgeapifor yourCommonmodule (if available) - depend on
forgeconfigapiport-fabricfor yourFabricmodule (if available) - depend on
forgeconfigapiport-forgefor yourForgemodule (if available) - NOT depend on the NeoForge distribution as the api is already available as part of the mod loader itself
repositories {
maven {
name = "Fuzs Mod Resources"
url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/"
}
}dependencies {
// NeoForge's config system
api("fuzs.forgeconfigapiport:forgeconfigapiport-common-neoforgeapi:<modVersion>")
// Minecraft Forge's config system
api("fuzs.forgeconfigapiport:forgeconfigapiport-common-forgeapi:<modVersion>")
}dependencies {
modApi("fuzs.forgeconfigapiport:forgeconfigapiport-fabric:<modVersion>")
}dependencies {
api("fuzs.forgeconfigapiport:forgeconfigapiport-neoforge:<modVersion>")
}dependencies {
api("fuzs.forgeconfigapiport:forgeconfigapiport-forge:<modVersion>")
}