MinecraftHub.io
Java Mods

SuperMartijn642's Config Lib

A developer library that lets a mod define its config once, then handles reloading, syncing and side-specific values automatically. Other mods pull it in as a dependency.

MinecraftHub-generated cover art for SuperMartijn642's Config Lib: a floating mountain block island with a workshop of crafting tables and furnaces and a chest, under a day sky

Screenshot 1 of 1. MinecraftHub-generated cover art for SuperMartijn642's Config Lib: a floating mountain block island with a workshop of crafting tables and furnaces and a chest, under a day sky

What SuperMartijn642's Config Lib works with.

PlatformJava Edition
LoadersFabric, NeoForge, Quilt, Forge
Minecraft versions1.12, 1.16.5, 1.17.1, 1.18.2, 1.19.4, 1.20.6, 1.21.11, 26.1.2, 26.2, 26.3
EnvironmentClient, Server

SuperMartijn642's Config Lib is a library for mod authors, published for Fabric, Forge, NeoForge and Quilt. It runs on both the client and the server. A mod defines its config once, and the library takes care of reloading values, syncing them to players and generating values for one side only.

Loaders and versions

  • Fabric and Quilt: Minecraft 1.18 to 26.3. The newest build requires Fabric API.
  • NeoForge: Minecraft 1.12 to 26.3. The newest build needs no dependencies.
  • Forge: Minecraft 1.12 to 26.2. The newest build needs no dependencies.

What the library handles

  • Reloads config values each time a world loads, by default.
  • Restricts a value to reload only when Minecraft launches, through a game restart flag.
  • Syncs values in common or server configs to connected players, unless a value is marked as not synced.
  • Supports booleans, integers and doubles with minimum and maximum bounds, and enums.
  • Adds comments to single values and to categories, and groups values into categories.

Using it as a player

Players rarely seek this out on purpose. It arrives as a requirement of another mod, and that mod's page will say so. Drop the file for your loader into the mods folder next to the mod that needs it, as described in how to install mods on Java Edition.

Using it as a developer

  1. 1.Create a ModConfigBuilder instance.
  2. 2.Call define with a name and a default value for each setting. Integers and doubles also take a minimum and a maximum.
  3. 3.Keep the Supplier that define returns and read the current value from it.
  4. 4.Optionally add comments, push and pop categories, or mark values as restart-only or unsynced.
  5. 5.Call build once every value is defined.

SuperMartijn642's Config Lib install walkthrough

Questions about SuperMartijn642's Config Lib.

3 questions

What does SuperMartijn642's Config Lib do?

It lets a mod author declare a config once. The library then reloads values between world loads, syncs them to players, and generates values that exist only on the client or only on the server. The effect shows up in the mods that use it.

Do I need to install Config Lib myself?

Only if a mod you use lists it as a requirement. Pick the file that matches your loader and Minecraft release, and place it in the mods folder next to that mod.

Does Config Lib work on multiplayer?

Yes. The files are tagged for both client and server, and values in common or server configs sync to connected players by default. A mod can mark a value as not synced, so some settings stay local.

More Java Mods like SuperMartijn642's Config Lib.

Guides for Java Mods.

Browse all Minecraft Java mods ↗