Getting started

How to add OneConfig to your mod

Latest versions

OneConfig Example Mod

If you're just starting out or need more advanced features like multiple versions, we highly recommend looking at our example mod. When cloning the example mod, please choose from one of the following branches:

Branch
Versions
Preprocessor?
DGT?
Notes

multi-version

All OneConfig-supported versions (1.8.9-Latest, Fabric/Forge)

You can always clone this branch and remove all but a single version, in case you want to tackle multiversion later.

legacy-forge

1.8.9 Forge

legacy-fabric

1.8.9 Fabric

modern-fabric

Latest Fabric

modern-forge

Latest Forge

kotlin-[branch]

N/A

Each branch has a Kotlin version.

Including OneConfig yourself

If you don't want to use our mod template, or wish to include OneConfig in one of your new or existing mods, add this to your build.gradle(.kts).

While you’re here, we recommend using Deftu's Gradle Toolkit, which automatically configures everything in your project for you, including OneConfig. DGT is included in our example mod template.

The toolkit works for all Minecraft versions from 1.8.9 - latest, and supports Forge, Fabric and NeoForge. Setting it up is as simple as applying the appropriate plugins for your needs and configuring the required configuration options. DGT also supports complicated setups such as multi-version projects.

It also provides several smaller utilities for things such as authenticating your Minecraft/Microsoft account in the developer environment via DevAuth or setting up your own Forge coremod.

Available modules

OneConfig's functionality is split into several modules for ease of use and to improve the developer experience. When making a mod using OneConfig, you will need to individually select modules you will be utilizing within your mod in order to gain access to their functionality, and the platform / Minecraft version-specific implementation of OneConfig.

Module
Purpose

commands

The tree based command system used in OneConfig.

config

The tree based configuration system used in OneConfig.

config-impl

The default implementation of the configuration system used in OneConfig.

events

The event system used in OneConfig.

hud

The HUD system used in OneConfig.

internal

OneConfig's UI implementation.

ui

The UI system used in OneConfig.

utils

Various utilities used in OneConfig.

Setting up your build files

toolkitLoomHelper {
    useOneConfig {
        version = "1.0.0-alpha.55" // Put whatever the latest is here
        loaderVersion = "1.1.0-alpha.35" // Put whatever the latest is here

        usePolyMixin = true // If you want to use Mixin on Legacy Forge, you need PolyMixin
        polyMixinVersion = "0.8.4+build.2" // If you want to use Mixin on Legacy Forge, you need PolyMixin

        applyLoaderTweaker = true // Set this to false if you want to use a custom tweaker.

        for (module in arrayOf("commands", "config-impl", "events", "hud", "internal", "ui", "utils")) {
            +module
        }
    }
}

Last updated