Wiki 9Minecraft Wiki 9Minecraft

SuperMartijn642s Config Lib FAQ

Java EditionModGuides 4FAQ 19Related mods 48

19 questions players actually ask, answered.

DownloadSuperMartijn642s Config Lib

Get the files on 9Minecraft

How do I start using Config Lib in my own mod?
Add Config Lib as a dependency in your mod's build file, then create a config builder in your mod's initialization code. Register the config with the builder so Config Lib can handle loading, syncing, and reloading for you.
How do I actually create a config file with Config Lib?
Use the config builder to define your config, then add entries like booleans, integers, strings, or lists with their default values and comments. Call the builder's register method so Config Lib generates the file and manages it.
What's the difference between client, server, and common configs in Config Lib?
Common configs exist on both sides and are usually synced, client configs only affect the client, and server configs only exist on the server. Config Lib generates the right file for each type automatically, so you don't have to handle that yourself.
How does config syncing between client and server work?
When you mark a config as synced, Config Lib sends the server's values to connecting clients so they match. Clients use the synced values instead of their local file, which prevents desync issues in multiplayer.
Why isn't my config syncing to clients?
The most common cause is forgetting to register the config as synced, or registering it on only one side. Make sure the config is registered during common setup and that the synced flag is set on the builder.
How do I reload config values without restarting Minecraft?
Config Lib watches the config file and reloads values when it changes, so editing and saving the file is usually enough. You can also trigger a reload through the mod's own reload command or keybind if it provides one.
Why are my config values resetting every time I load a world?
This usually happens when the config is registered too late or in the wrong place, so Config Lib can't track it properly. Register your config during your mod's common initialization before any world loads.
Can I use Config Lib for a server-only config?
Yes, Config Lib supports server-only configs that live on the server and aren't sent to clients. Register the config as server-side so it generates and loads only where it's needed.
Does Config Lib work with other config mods or cause conflicts?
Config Lib is a library other mods depend on, so it generally coexists fine with other config systems. Conflicts are rare and usually come from two mods trying to manage the same file, not from Config Lib itself.
Does Config Lib hurt performance or cause lag?
Config Lib is lightweight and only reads values when needed, so it has negligible impact on performance. Reloading happens on file changes rather than every tick, so it won't cause ongoing lag.
How do I create a config file for my mod using Config Lib?
In your mod's code, build a ConfigBuilder, add your options with the provided value types, and call the build method with a name and a path. Config Lib then creates the file and handles loading, saving, and syncing automatically.
Where does Config Lib put the config files it generates?
It writes them to the standard config folder for your mod loader, typically inside a folder named after your mod. The exact path is determined by the name and directory you pass when building the config.
How do I make a config value apply to everyone on a server instead of just me?
Mark the option as a server config rather than a client config when registering it. Server values are read from the server's file and synced to connected clients, so all players see the same setting.
Why does my config value reset or not save after I change it?
This usually happens when the value is edited while the game is running without triggering a save, or when a server config is changed on the client side where it has no effect. Edit the correct file for the config type and reload or restart so the change is picked up.
Can I change config options in-game without restarting?
Yes, Config Lib supports reloading values between world loads and can apply changes without a full restart. Some options may still require a world reload or rejoin to take effect depending on how the mod reads them.
How do I edit a mod's config file by hand?
Open the config file in a text editor, change the values while keeping the existing structure and keys intact, then save. Config Lib will read the updated file the next time it loads or reloads the config.
Does Config Lib work on both the client and the server?
Yes, it is designed to run on both sides and handles syncing values between them. Server-side values are authoritative and get sent to clients so everyone stays consistent.
Will Config Lib slow down my game or cause performance issues?
No, it is a lightweight library focused on config handling and does not add ongoing per-tick overhead. Any performance impact comes from the mods using it, not from the config system itself.
Do I need Config Lib installed on both the client and server for mods that use it?
Yes, any mod that depends on Config Lib requires it on both sides, since the library handles loading and syncing on client and server. Missing it on either side will prevent those mods from working.