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,217,777

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
Hearthgrove - Cobblemon Server Pack Hearthgrove - Cobblemon Server Pack Five Moon's FNaF Pack Five Moon's FNaF Pack Tensura Nexus Tensura Nexus Eight Seas Eight Seas Figuratives 2 Figuratives 2 TitanChronicles TitanChronicles Tube's Not a modpack Modpack Tube's Not a modpack Modpack Dimensions Expanded Dimensions Expanded DragonFyre DragonFyre The Old Kitchen The Old Kitchen Sky Greg Fork Sky Greg Fork Create: Endless Industry Create: Endless Industry ExtremeCraftz ExtremeCraftz Create Boundary Engineer Create Boundary Engineer Cobblemon: Age Of Industry Cobblemon: Age Of Industry PacPack Voxydized PacPack Voxydized BeeShield Legends BeeShield Legends SmashMC Pixelmon SmashMC Pixelmon HBM Boom HBM Boom Mechs & Mysteries Mechs & Mysteries Immersive Factory - Create and Immersive Petroleum Immersive Factory - Create and Immersive Petroleum Star Wars Aeronautics and superheroes Star Wars Aeronautics and superheroes Automatic Bakery & Restaurants Automatic Bakery & Restaurants Space and Beyond! Space and Beyond! Evocraft  cobblemon X create V2 Evocraft cobblemon X create V2 JoJo's Bizarre Pack JoJo's Bizarre Pack PARANOID - Beyond Sanity PARANOID - Beyond Sanity fortcraft+ fortcraft+ Kingdom HeartCraft Kingdom HeartCraft Aetherium Forge Aetherium Forge Feudal Fantasy Feudal Fantasy Create Waves Create Waves Jurassic Block World Jurassic Block World Aerium Aerium ComboTech 4 Sky High ComboTech 4 Sky High Throlash Create: Nations Throlash Create: Nations Bobruisk (OxMODPACK) Bobruisk (OxMODPACK) Family Friendly Pack Family Friendly Pack PixelSprings PixelSprings gears guns and dragons gears guns and dragons City Life 4.0 City Life 4.0 Create Woensdag - Aeronautics Create Woensdag - Aeronautics The Lands Between THEO The Lands Between THEO Better than Bundles! - BTB Better than Bundles! - BTB Xomaps RPG Xomaps RPG Create OneBlock | by Saurier.xyz Create OneBlock | by Saurier.xyz Dark's Trials of the Unknown Dark's Trials of the Unknown Prism Drift Prism Drift Create All The Creativity Create All The Creativity MCB Create Live MCB Create Live Explore the Bright World Explore the Bright World Paleo Project Paleo Project Tensura Abyssal Reincarnation Tensura Abyssal Reincarnation Athy's Cobbleswamp Athy's Cobbleswamp DiscoTech's Tinkers' Creations DiscoTech's Tinkers' Creations Kreyc's Overgrown Pack Kreyc's Overgrown Pack CR Craft REMASTERED CR Craft REMASTERED One Block to Rule Them All One Block to Rule Them All Create Beyond the Skies Create Beyond the Skies Vanilla Reinvented Vanilla Reinvented The Order of the Stone The Order of the Stone Absolute Industrialization Absolute Industrialization ALCHEMIST RPG ALCHEMIST RPG Most the Mods official Mod pack Most the Mods official Mod pack Barbtoria 2 Barbtoria 2 Brother's RPG Brother's RPG Dynasty Craft [RPG] Dynasty Craft [RPG] Natures Odyssey Natures Odyssey Create: Whiskers and Wonders Create: Whiskers and Wonders Dark Chocolate Edition Dark Chocolate Edition Suscraft Recharged Suscraft Recharged Scientific Rocketry 2 Scientific Rocketry 2 Immortal Craft Reimagined Immortal Craft Reimagined The Last Province zombie apocalypse The Last Province zombie apocalypse uhpvp uhpvp Mystic's Monstrosity - Immersive Edition Mystic's Monstrosity - Immersive Edition Create Aeronautics (& Stuff) Create Aeronautics (& Stuff) Create Cracking Contraptions 5: Aeronautics Create Cracking Contraptions 5: Aeronautics lower items and fire lower items and fire Medieval Sieges and Airship warfare Medieval Sieges and Airship warfare The Adventure of 1000 - Hunters of Evil The Adventure of 1000 - Hunters of Evil SimplyFellas SimplyFellas GreenBound GreenBound Moewe's Modded Vanilla Moewe's Modded Vanilla Create Aeronautics Sky Islands Create Aeronautics Sky Islands Raft Survival Extreme Raft Survival Extreme Minemon -- A cobbleverse spinoff Minemon -- A cobbleverse spinoff Better Survival (BSurvival2) Better Survival (BSurvival2) Maor The King Of The Light Maor The King Of The Light theajpack! theajpack! Gregtech Reverberating Nexus Gregtech Reverberating Nexus RuneCraft(RPG) RuneCraft(RPG) VALE - Folklore Flavor VALE - Folklore Flavor CUNICULUM CUNICULUM Create Industrial Village Create Industrial Village Engineer's Journey Engineer's Journey cool Star Wars fan pack cool Star Wars fan pack Soul Leveling Soul Leveling Bigger Holes: Rebuild Society Bigger Holes: Rebuild Society DracoNeo - Council of Wyrms DracoNeo - Council of Wyrms

External Resources