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,091,407

CurseForge ID

438332

Modrinth Downloads

33,900,059

Modrinth ID

LN9BxssP

Last Updated

Nov 6, 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,556)

Show fewer
All the Mods 10 - ATM10 All the Mods 10 - ATM10 Zombie Invade 100 Days Zombie Invade 100 Days All the Mods 9 - ATM9 All the Mods 9 - ATM9 Prominence™ II: Hasturian Era Prominence™ II: Hasturian Era DawnCraft - Echoes of Legends DawnCraft - Echoes of Legends DeceasedCraft - Urban Zombie Apocalypse DeceasedCraft - Urban Zombie Apocalypse All the Mods 8 - ATM8 All the Mods 8 - ATM8 COBBLEVERSE - Pokemon Adventure [Cobblemon] COBBLEVERSE - Pokemon Adventure [Cobblemon] All the Mods 6 - ATM6 All the Mods 6 - ATM6 Vault Hunters Third Edition Vault Hunters Third Edition Crazy Craft Updated Crazy Craft Updated All in One [Modded One Block] All in One [Modded One Block] All the Mods 10: To the Sky   ATM10SKY All the Mods 10: To the Sky ATM10SKY Valhelsia 3 Valhelsia 3 Beyond Depth Beyond Depth All the Mods 9 - To the Sky - atm9sky All the Mods 9 - To the Sky - atm9sky Craftoria Craftoria All the Mods 7 - ATM7 All the Mods 7 - ATM7 FTB StoneBlock 4 FTB StoneBlock 4 Craft to Exile 2 (VR Support) Craft to Exile 2 (VR Support) Valhelsia 2 Valhelsia 2 BigChadGuys Plus (w/ Cobblemon!) BigChadGuys Plus (w/ Cobblemon!) Lucky World Invasion Lucky World Invasion Prominence™ II: Hasturian Era Prominence™ II: Hasturian Era All the Mods 7 - To the Sky - atm7sky All the Mods 7 - To the Sky - atm7sky Slimes Adventure Slimes Adventure All the Mons - ATMons All the Mons - ATMons Better Adventures+ Better Adventures+ MC Eternal 2 MC Eternal 2 Valhelsia 6 Valhelsia 6 Kimetsu no Yaiba (Demon-Slayer) ModPack Kimetsu no Yaiba (Demon-Slayer) ModPack Isle of Berk (Claws of Berk) Isle of Berk (Claws of Berk) Integrated MC Integrated MC Solo Leveling - Reawakening Solo Leveling - Reawakening Create: Perfect World Create: Perfect World TerraFirmaGreg-Modern TerraFirmaGreg-Modern Cobblemon Delta Cobblemon Delta MineColonies Official MineColonies Official SkyFactory 5 SkyFactory 5 Society: Sunlit Valley Society: Sunlit Valley Enigmatica 6 - E6 - 1.16.5 Enigmatica 6 - E6 - 1.16.5 Endless Horror - The ULTIMATE Horror Experience Endless Horror - The ULTIMATE Horror Experience FTB OceanBlock 2 FTB OceanBlock 2 Aged Aged FTB StoneBlock 3 FTB StoneBlock 3 Play as Dragon [Abandoned] Play as Dragon [Abandoned] Pokemon Elysium Pokemon Elysium MineColonies: Dimensional Adventure MineColonies: Dimensional Adventure VerityCraft - A Realistic Horror Experience VerityCraft - A Realistic Horror Experience M-Tech M-Tech All the Mods 11 - ATM11 All the Mods 11 - ATM11 All the Mods 9 - No Frills All the Mods 9 - No Frills All the Mods 6 - To the Sky - ATM6sky - Skyblock All the Mods 6 - To the Sky - ATM6sky - Skyblock Chocolate Edition Minecraft Chocolate Edition Minecraft Prehistoric World - Dinosaurs, Adventure & Quests | NEW PREHISTORY UPDATE! Prehistoric World - Dinosaurs, Adventure & Quests | NEW PREHISTORY UPDATE! Landscapes Reimagined Genesis Landscapes Reimagined Genesis Star Technology Star Technology Project Architect 2 Project Architect 2 Abyssal Ascent Abyssal Ascent One Block Horror One Block Horror Medieval MC [FORGE] MMC4 Medieval MC [FORGE] MMC4 Biohazard: Project Genesis - The Ultimate Apocalypse Biohazard: Project Genesis - The Ultimate Apocalypse New Game - An Improved Experience | 1.21 UPDATE! New Game - An Improved Experience | 1.21 UPDATE! Cisco's Fantasy Medieval RPG [Dragonfyre] Cisco's Fantasy Medieval RPG [Dragonfyre] Chosen's Modded Adventure Chosen's Modded Adventure Craft to Exile [Dissonance] Craft to Exile [Dissonance] Pokehaan Craft 2 Pokehaan Craft 2 Reclamation - Reclaim the World! Reclamation - Reclaim the World! All the Magic Spellbound - ATMS All the Magic Spellbound - ATMS Create+ [Old] Create+ [Old] BigChadGuys and the Holy Grail BigChadGuys and the Holy Grail Lapito's Galacticraft Lapito's Galacticraft Create: Arcane Engineering Create: Arcane Engineering UniversIO UniversIO All of Fabric 6 - AOF6 All of Fabric 6 - AOF6 Exosphere 1 Exosphere 1 Ascendra Ascendra Seaopolis: Submerged Seaopolis: Submerged SkyFactory One SkyFactory One All of Fabric 7 - AOF7 All of Fabric 7 - AOF7 Beyond Ascension Beyond Ascension Astroblock Astroblock Cottage Witch Cottage Witch Ragnamod VI Ragnamod VI Infernal Origins Infernal Origins FTB Skies 2 FTB Skies 2 Valhelsia 5 Valhelsia 5 Industrial Village Industrial Village Cave Factory Cave Factory Age of Fate Age of Fate Dysfunctional's Tech, Bombs, Guns, and War Dysfunctional's Tech, Bombs, Guns, and War Essentials Mods [FORGE] - 1.21 RELEASE! Essentials Mods [FORGE] - 1.21 RELEASE! Cute Craft Cute Craft Pokemania Cobblemon Pokemania Cobblemon Raspberry Flavoured Raspberry Flavoured Cobblemon Academy 2.0 Cobblemon Academy 2.0 Techopolis 3 Techopolis 3 Seaopolis Seaopolis New Simple Mods - Easy to Understand | 1.21 UPDATE! New Simple Mods - Easy to Understand | 1.21 UPDATE! Stacia 2 Expert Stacia 2 Expert

External Resources