Konfig: The Ultimate Multi-Loader Config Library for Minecraft Mods
Every seasoned Minecraft modder knows the pain of managing configuration files across different mod loaders. Writing separate code for Fabric, Forge, and NeoForge can turn a simple settings screen into a tedious chore. Enter Konfig, a multiloader configuration library that unifies the process and lets you focus on what really matters: building great mods.
What Makes Konfig Stand Out
Konfig is not just another config wrapper. It is a full-featured library that handles everything from value declaration to file generation and in-game editing. Whether you are targeting Fabric, Forge, or NeoForge, Konfig keeps your codebase clean and your players happy with intuitive config screens.
Typed Config Values with Built-in Validation
Forget parsing raw strings and worrying about invalid inputs. Konfig supports booleans, integers, strings, enums, string lists, and even custom codecs. Each value is strongly typed, so your mod reads exactly what it expects. You can also define ranges for numbers, ensuring players never accidentally set a value that breaks your mod.
TOML Files with Comments and Structure
Konfig writes all configuration to well-organized TOML files under config/<modid>/<name>.toml. Every value, category, and section can include comments, headers, and descriptive text. This means your config files are not just machine-readable; they are human-friendly too. Players can tweak settings manually without guessing what each option does.
Smart Sync Modes for Multiplayer
Server-side configuration is often overlooked. Konfig offers three sync modes: NONE (client-only), LOGIN (synced when a player joins), and LOGIN_AND_RELOAD (synced and automatically reloaded). This ensures that critical gameplay settings stay consistent across all players without extra networking code.
Auto-Generated Config Screens
One of Konfig's most powerful features is its ability to generate configuration screens automatically. For Fabric, it integrates with Mod Menu. For Forge and NeoForge, it adds a handy config button. You can decorate these screens with headers, images, descriptive text, and clickable URLs. Tooltips and rich hover panels provide extra guidance, making your mod feel polished and professional.
Supported Minecraft Versions and Loaders
Konfig is built to be future-proof. The latest release supports Minecraft versions from 1.14.4 all the way up to the newest 1.21.x snapshots. Fabric support starts at 1.14.4, Forge at 1.16.5, and NeoForge at 1.21.1. The versioning scheme uses a semantic core with a +<mc> suffix, so you always know exactly which artifact to grab. For example, 0.4.0+1.21.1 targets Minecraft 1.21.1, while 0.4.0+26.2 targets the latest snapshot line.
How to Install Konfig
Adding Konfig to your modding project is straightforward. First, include the Kaf Maven repository in your build script:
- Repository URL:
https://maven.kaf.sh
Then, add the loader-specific dependency. Do not depend on the common artifact directly; always use the artifact matching your target loader:
- Fabric:
modImplementation "com.iamkaf.konfig:konfig-fabric:<version>" - Forge:
modImplementation "com.iamkaf.konfig:konfig-forge:<version>" - NeoForge:
modImplementation "com.iamkaf.konfig:konfig-neoforge:<version>"
If you are a player looking to download Konfig for your modpack, you can find it on popular mod hosting platforms. Many launchers, including the foxygame.net launcher, offer one-click installation for mods that bundle Konfig, so you can jump straight into the game without manual file management.
Getting Started with Konfig in Your Mod
Using Konfig is refreshingly simple. You define a config handle and your values in a static block, and the library takes care of the rest. Here is a quick breakdown of the key concepts:
Declaring a Config Handle
Every config starts with a builder. You specify your mod ID, a config name, and a scope (CLIENT, COMMON, or SERVER). The scope determines which side the config is loaded on and whether it syncs to clients. You can also set a sync mode and add global metadata like a header or documentation URL.
Adding Values and Categories
Konfig supports a fluent API for adding values. You can create booleans, integers with ranges, enums, strings, and more. Each value can have a comment, tooltip, and rich info panel. Categories help organize related settings, and you can nest them for complex mods. The library even handles schema versioning and step-by-step migrations, so your config evolves safely as your mod grows.
Reading and Writing Values at Runtime
Accessing a config value is as simple as calling ConfigValue#get(). If you need to change a setting programmatically, use ConfigValue#set(value). Konfig handles the file I/O and sync logic behind the scenes, so your mod code stays clean and focused.
Why Konfig Is a Game-Changer for Mod Developers
Konfig eliminates the boilerplate that plagues multiloader mod development. Instead of maintaining three separate config implementations, you write your logic once in common code. Loader-specific integration stays neatly in the loader roots, while everything else lives alongside your mod's core. This not only saves time but also reduces bugs and makes your mod easier to maintain.
The generated config screens are a huge win for player experience. No more editing raw JSON or TOML files in a text editor; players get a clean, interactive UI with all the information they need. And because Konfig supports rich metadata, you can provide different help text for the config file and the in-game screen, catering to both power users and casual players.
Community and Contributions
Konfig is an open-source project maintained by a single developer, but community contributions are welcome. If you want to help translate the mod into your language, there is an active translation project covering English, Spanish, Brazilian Portuguese, French, German, Russian, Turkish, Japanese, Korean, and Chinese. You can also report issues or suggest features on the project's issue tracker or Discord server.
Final Thoughts
Whether you are building a small quality-of-life tweak or a massive content overhaul, Konfig for Minecraft gives you a robust, future-proof configuration system. Its multiloader design, typed values, and automatic screen generation make it an essential tool for any modern modder. If you are ready to streamline your development workflow, download Konfig today and see how much easier mod configuration can be.