Skip to content

Getting Started on 1.20.2 and Up

Fuzss edited this page Jan 10, 2024 · 1 revision

Set up your Gradle build script

The recommended way of adding FCAP to your project is via Gradle in your build.gradle file.

Selecting a version

In the groovy snippets make sure to replace <modVersion> with the version of FCAP you intend to use. Version numbers have a pretty simple form such as 8.0.0 (for Minecraft 1.20.1) or 20.4.2 (for Minecraft 1.20.4).

All available versions can be viewed on CurseForge & Modrinth.

Choosing a distribution

FCAP 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 FCAP on the mod loader the config system is ported from. The table below shows what config system (either NeoForge's or Forge's) is available in which distribution.

Project Type Distribution Name NeoForge Api 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-neoforgeapi for your Common module (if available)
  • depend on forgeconfigapiport-fabric for your Fabric module (if available)
  • depend on forgeconfigapiport-forge for your Forge module (if available)
  • not depend on the NeoForge distribution as the api is already available as part of the mod loader itself

Configuring repositories

repositories {
    maven {
        name = "Fuzs Mod Resources"
        url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/"
    }
}

Configuring dependencies for VanillaGradle

dependencies {
    // NeoForge's config system
    api "fuzs.forgeconfigapiport:forgeconfigapiport-common-neoforgeapi:<modVersion>"
    // Forge's config system
    api "fuzs.forgeconfigapiport:forgeconfigapiport-common-forgeapi:<modVersion>"
}

Configuring dependencies for Fabric Loom / Architectury Loom

dependencies {
    modApi "fuzs.forgeconfigapiport:forgeconfigapiport-fabric:<modVersion>"
}

Configuring dependencies for NeoGradle

dependencies {
    api "fuzs.forgeconfigapiport:forgeconfigapiport-neoforge:<modVersion>"
}

Configuring dependencies for ForgeGradle

dependencies {
    api(fg.deobf("fuzs.forgeconfigapiport:forgeconfigapiport-forge:<modVersion>"))
}