Modscraper Modscraper Minecraft
SuperMartijn642's Config Lib logo

SuperMartijn642's Config Lib

Mod

by SuperMartijn642

Config Lib makes dealing with config files just a bit easier.

Type

Mod

CurseForge Downloads

182,489,953

CurseForge ID

438332

Modrinth Downloads

31,454,882

Modrinth ID

LN9BxssP

Last Updated

Sep 15, 2026

Description

 SuperMartijn642's Config Lib

SuperMartijn642's Config Lib allows you to specify a config once and it then handles reloading values between world loads, syncing values with clients, and generating values for client- or server-only on its own.

 

Seperator

 

Creating a config:

 

A config is created using a ModConfigBuilder.

Simply create a new instance using #ModConfigBuilder().

 

   ModConfigBuilder builder = new ModConfigBuilder();

 

A value can be added to the config with ModConfigBuilder#define which takes a name and a default value.

For integer and double values a minimum and maximum value are also required.

Test code block;

 

ModConfigBuilder#define returns a Supplier which should be stored to retrieve the value from the config.

 

   Supplier<Boolean> booleanValue = builder.define( "booleanValue", true );

   Supplier<Integer> integerValue = builder.define( "integerValue", 5, 0, 10 );

   Supplier<Double> doubleValue = builder.define( "doubleValue", 0.5, 0, 1);

   Supplier<ExampleEnum> enumValue = builder.define( "enumValue", ExampleEnum.VALUE_1 );

 

A comment can be added to a value by calling ModConfigBuilder#comment(String) before defining the value.

 

   Supplier<Boolean> valueWithComment = builder.comment( "this is a comment for 'valueWithComment'" ).define( "valueWithComment ", true );

 

By default values are reloaded when world is loaded.

This can be changed to only reload a value when Minecraft launches by calling ModConfigBuilder#gameRestart() before defining the value.

 

   Supplier<Boolean> notReloadedValue = builder.comment( "this is value will not be reloaded" ).define( "notReloadedValue", true );

 

Values in COMMON or SERVER configs are synchronized with clients by default, to prevent this use ModConfigBuilder#dontSync().

 

   Supplier<Boolean> notSynchronizedValue = builder.comment( "this is value will not be synchronized" ).define( "notSynchronizedValue", true );

 

Values can also be put into categories.

ModConfigBuilder#push(String) pushes a category and ModConfigBuilder#pop() pops a category.

 

   builder.push( "special" );

   Supplier<Boolean> specialValuebuilder.comment( "this value is in the 'special' category" ).define( "specialValue", true );

   builder.pop();

 

A comment can be added to the active category using ModConfigBuilder#categoryComment(String).

 

   builder.push( "client" ).categoryComment( "this, is a comment for the 'client' category" );

 

After defining all values ModConfigBuilder#build() must be called to finish the config.

 

   builder.build();

 

Now the values in your config will reloaded and synced automatically and the values can be retrieved using the stored Supplier instances.

This will work for all available versions, that includes Minecraft 1.12, 1.14, 1.15, and 1.16

 

Seperator

 

Example Mod:

 

For a concrete example of how to use Config Lib checkout the example mod.

 

Seperator

 

Discord

For future content, upcoming mods, and discussion, feel free to join the SuperMartijn642 discord server!

IG1us6p.png

 

Seperator

Compatibility

Mod Loaders

Fabric Forge Neoforge Quilt

Game Versions

1.12 1.12.1 1.12.2 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 +40 more

Recommended Gear

Affiliate

Hardware and extras that pair well with this mod.

As an Amazon Associate I earn from qualifying purchases.

Similar Mods

Included in Modpacks (3,307)

Show fewer
MultiCraft: Realms & Rockets MultiCraft: Realms & Rockets Cosmic Convergence Cosmic Convergence The Sakura SMP The Sakura SMP Multicolonies Multicolonies Bitz  Spoon Create Season 1 Bitz Spoon Create Season 1 💎 Legend Infinity Project 💎 Legend Infinity Project Solo Leveling: Crafted Solo Leveling: Crafted Cobblemon Pick Your Poison Cobblemon Pick Your Poison Build Secure Protect Build Secure Protect Cobblemoncolonies Cobblemoncolonies Atom & Dragon Atom & Dragon BounceCraft: ModernConflict BounceCraft: ModernConflict Star Wars The Last Jedi Lightning Holder Star Wars The Last Jedi Lightning Holder Vanilla Enhanced Vanilla Enhanced Bluu's  Mystical Adventure Bluu's Mystical Adventure Horrify+ Horrify+ MonkTech 3 MonkTech 3 Halloween-Craft 2 Halloween-Craft 2 Godzillawarz's Kitchen Sink Godzillawarz's Kitchen Sink HypeCraft - Saison 3 HypeCraft - Saison 3 AdvoTech Aeronautic AdvoTech Aeronautic Recraft S7 Deceased Craft Recraft S7 Deceased Craft bliblu bliblu Martinj Realistico Martinj Realistico Cobblemon Union Cobblemon Union Bizarre Craft (A Homage To Crazy Craft) Bizarre Craft (A Homage To Crazy Craft) Jellisy Vanilla Jellisy Vanilla create live erisa create live erisa HinecrafT HinecrafT OceanCastle-Modded Adventure OceanCastle-Modded Adventure Vanilla Smooth🍃 Vanilla Smooth🍃 Mantecraft Mantecraft Pingu's Of-Cobblemon Pingu's Of-Cobblemon Vanilla Odyssey Vanilla Odyssey Cozy Visuals Cozy Visuals Quebecs Goated Pack Quebecs Goated Pack Create UNSC version Create UNSC version Better Survival (BSurvival2) Better Survival (BSurvival2) Aeronautical Islands Aeronautical Islands Fleshmon Fleshmon Leos fantastiska modpaket Leos fantastiska modpaket Cobblemon - Vapeur & Constellation Cobblemon - Vapeur & Constellation Castigo's Castigo's Duckemon Duckemon Create-Acsended Create-Acsended Elysian Horizon Elysian Horizon Primorus Primorus amethyst pvp amethyst pvp Pvp Optimized Pack Pvp Optimized Pack Create: The Age of the Sky Create: The Age of the Sky Creatively Create Create Skyward Odyssey Create Skyward Odyssey Ducky's Fantasy Ducky's Fantasy Kingdom's Unbound Official Pack Kingdom's Unbound Official Pack Ad Odyssey Ad Odyssey Wasteland Reborn Wasteland Reborn Steampunk Wizard City Steampunk Wizard City Ascended Gear SMP Ascended Gear SMP Vani's Project Vani's Project Just Create Pluss Just Create Pluss BetterVanilla SMP ModPack BetterVanilla SMP ModPack Biggess Pack Cat Edition V2 Biggess Pack Cat Edition V2 Eclipse Studio's Cobblemon Eclipse Studio's Cobblemon Jurassic world: Mesozoic Mayhem Jurassic world: Mesozoic Mayhem Create: Conqueror's Frontier Create: Conqueror's Frontier Final Factory Final Factory fortcraft+ fortcraft+ Winter's Fury 2 A Journey Through The Frost Winter's Fury 2 A Journey Through The Frost Zesukki Zesukki SK33 - CreateFull SK33 - CreateFull ChaMods ChaMods Legacy of the Cogs Legacy of the Cogs IsekaiANewWorld IsekaiANewWorld Overclock - Tech Automation with Quests | Create, Aeronautics, AE2, Modern Industrialization & More Overclock - Tech Automation with Quests | Create, Aeronautics, AE2, Modern Industrialization & More Forged Frontier Forged Frontier Journey in Motion Journey in Motion Visually Vibrant - [FABRIC] Visually Vibrant - [FABRIC] L'Etang L'Etang ALCHEMIST RPG ALCHEMIST RPG FORRANDKpokemansreal FORRANDKpokemansreal CC - CreateCobble CC - CreateCobble Onion's Fantasy Pack Onion's Fantasy Pack Pandora's Cobblemon Pandora's Cobblemon quaniiiboiii cobblemon quaniiiboiii cobblemon VANILLA FPS (VF+) VANILLA FPS (VF+) Adventures in Time - Dalek Wasteland Adventures in Time - Dalek Wasteland Billabong Frontiers Billabong Frontiers Pandaemonia origins Pandaemonia origins CSP Revenge CSP Revenge TechnikDream2 TechnikDream2 Gears, Dragon and Vampires Gears, Dragon and Vampires Create: Just Extended Tuned Tuned Community in the Skies (with Origins) Community in the Skies (with Origins) ChillCraft (SummerEdition) ChillCraft (SummerEdition) Quantum Haunt Quantum Haunt Vanilla Plus - Slime Edition Vanilla Plus - Slime Edition Blad Pack Blad Pack The Fallen Worlds The Fallen Worlds Cactus SMP Factions Cactus SMP Factions

External Resources