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

191,222,300

CurseForge ID

438332

Modrinth Downloads

33,931,933

Modrinth ID

LN9BxssP

Last Updated

Nov 7, 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> specialValue = builder.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

Client Fabric Server Quilt

Game Versions

26.3

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,564)

Show fewer
Aethelgardd Aethelgardd RequiemCraft RequiemCraft Forge-rune.fr Forge-rune.fr Vanilla Enhanced Vanilla Enhanced create live erisa create live erisa Kaelo's Fantasy RPG - Valthera Kaelo's Fantasy RPG - Valthera Castigo's Castigo's AikoCraft AikoCraft Venturecraft Venturecraft AgalarMC Vanilla AgalarMC Vanilla Sorcerer's Blade Sorcerer's Blade Mine Attack Mine Attack SV_Adventures V3 SV_Adventures V3 INFINITY FACTORY INFINITY FACTORY A Winterly Christmas World - WCW A Winterly Christmas World - WCW BOI IV BOI IV CARCHcraft CARCHcraft Bluu's  Mystical Adventure Bluu's Mystical Adventure Rebirth RPG Rebirth RPG Farbound Farbound Qilby Industries Qilby Industries Femboy Foundry Femboy Foundry [ -NewFracTal-] [ -NewFracTal-] FriendForest FriendForest StarbaseSMP - Apocalypse StarbaseSMP - Apocalypse Create-Acsended Create-Acsended Barely Modded Barely Modded MineCity NewEra MineCity NewEra Lala's Land Lala's Land TakoPack Colonies 2 TakoPack Colonies 2 Stormdal Colonies Stormdal Colonies Immersive Beauty Immersive Beauty Shroomcraft 2 Cobblemon Edition Shroomcraft 2 Cobblemon Edition GRP Server project GRP Server project VKRPG VKRPG Hephaestus Forge - Sky Hephaestus Forge - Sky Kennaye Server Pack Kennaye Server Pack The Maddest Son The Maddest Son Common-Arcadia - Next Gen Common-Arcadia - Next Gen De Grote Spelers Modpack De Grote Spelers Modpack AndyTech AndyTech BetterVanilla SMP ModPack BetterVanilla SMP ModPack Taste of Matcha Taste of Matcha Crimson Valley Crimson Valley Sarcasticraft Resurrection Sarcasticraft Resurrection HinecrafT HinecrafT Wasteland Reborn Wasteland Reborn Dimmas91: Legacy of Creation Dimmas91: Legacy of Creation Cobblemon Forever Edition Cobblemon Forever Edition Relic Realms [FORGE] RR1 Relic Realms [FORGE] RR1 SK33 - CreateFull SK33 - CreateFull Quebecs Goated Pack Quebecs Goated Pack Pingu's Of-Cobblemon Pingu's Of-Cobblemon Ducky's Fantasy Ducky's Fantasy Vanilla Smooth🍃 Vanilla Smooth🍃 ModernWarfare to the Max ModernWarfare to the Max The Sakura SMP The Sakura SMP Cobblemon - Vapeur & Constellation Cobblemon - Vapeur & Constellation team pkb pack team pkb pack SCBEE SCBEE UY8 Create+ UY8 Create+ Create:Automata Offical Create:Automata Offical Breio Breio bliblu bliblu Tensura - Tempest Origins Tensura - Tempest Origins MultiCraft: Realms & Rockets MultiCraft: Realms & Rockets FORRANDKpokemansreal FORRANDKpokemansreal Reincarnation and Wrenches Reincarnation and Wrenches UnstableCraft UnstableCraft Create: New Era Start Create: New Era Start HardPack_Reloaded HardPack_Reloaded GM's Optimized Neoforge GM's Optimized Neoforge Vanilla Plus - Slime Edition Vanilla Plus - Slime Edition Horrify+ Horrify+ Dynasty Lords Dynasty Lords HypeCraft - Saison 3 HypeCraft - Saison 3 Mazite Mazite Fallout Realms Fallout Realms OceanCastle-Modded Adventure OceanCastle-Modded Adventure Final Factory Final Factory Forged Frontier Forged Frontier Godzillawarz's Kitchen Sink Godzillawarz's Kitchen Sink LostCraft (2025) LostCraft (2025) Create Skyward Odyssey Create Skyward Odyssey Winter's Fury 2 A Journey Through The Frost Winter's Fury 2 A Journey Through The Frost BagelQuest BagelQuest vxsp vxsp Age of Brass SMP Age of Brass SMP Contemporary Spellcraft Contemporary Spellcraft Masivo SMP - Farfadox Server [Fan Made] Masivo SMP - Farfadox Server [Fan Made] Paleo Project 2 - Genesis Protocol Paleo Project 2 - Genesis Protocol CC - CreateCobble CC - CreateCobble Gears, Dragon and Vampires Gears, Dragon and Vampires Thoryx Thoryx Steampunk Wizard City Steampunk Wizard City Cactus Edition Cactus Edition Create Elements 6 Create Elements 6 TherianCraft TherianCraft depenas depenas Dylan's Cozy Vanilla+ Dylan's Cozy Vanilla+

External Resources