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,317,666

CurseForge ID

438332

Modrinth Downloads

31,407,908

Modrinth ID

LN9BxssP

Last Updated

Sep 14, 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,303)

Show fewer
'Monster Looker' 'Monster Looker' Dragons & Trolls & Pokemon, Oh My! Dragons & Trolls & Pokemon, Oh My! Arceus's Cobblemon and Create Arceus's Cobblemon and Create Aetherium Forge Aetherium Forge Faga's Cobblemon & Create Faga's Cobblemon & Create Better MC [ PACK ] Better MC [ PACK ] Karma's Cobblemon Mechanical Magic Karma's Cobblemon Mechanical Magic Conquest & Kingdoms Conquest & Kingdoms Prehistoric World 2 | Unusual Prehistory 2, Dinosaurs, Quests & More Prehistoric World 2 | Unusual Prehistory 2, Dinosaurs, Quests & More DB Navigation & Trains DB Navigation & Trains QuestCreate VR QuestCreate VR CrazyCrafters 3.0 CrazyCrafters 3.0 Immortal Craft Immortal Craft Assembly Assembled Assembly Assembled Late Long Nights Late Long Nights Friendgroup create server Friendgroup create server Athy's Cobbleswamp Athy's Cobbleswamp Dank-Dreams Dank-Dreams GregTech Apocalypse GT-A GregTech Apocalypse GT-A Luminosity Luminosity Society Sunlit Valley - Mystical Skyblock Society Sunlit Valley - Mystical Skyblock Mechanical suffering Mechanical suffering Ice, Fire, & Gunpowder Ice, Fire, & Gunpowder Messed Up Cozy Pack Messed Up Cozy Pack Tensura Nexus Tensura Nexus PixelSprings PixelSprings Throlash Create: Nations Throlash Create: Nations cool Star Wars fan pack cool Star Wars fan pack No Limits Project No Limits Project FUN CITY CRAFT - Amethyst Edition FUN CITY CRAFT - Amethyst Edition The Ancient Hell The Ancient Hell Java Overhaul Java Overhaul Jimmu's Factory 2 Jimmu's Factory 2 Sitchen Kink Sitchen Kink Better than Bundles! - BTB Better than Bundles! - BTB Automatic Bakery & Restaurants Automatic Bakery & Restaurants Creative Colonies - [Build, Automate, Thrive] Creative Colonies - [Build, Automate, Thrive] The Ultimate PVP Modpack The Ultimate PVP Modpack Bobruisk (OxMODPACK) Bobruisk (OxMODPACK) Myths & Ruins (RPG) Myths & Ruins (RPG) JoJo's Bizarre Pack JoJo's Bizarre Pack Create Coasters - Rollercoaster - Thrillworks Create Coasters - Rollercoaster - Thrillworks Super Enhanced Visuals Super Enhanced Visuals Explore the Bright World Explore the Bright World Battlecraft 2.0 Battlecraft 2.0 Buddycraft - Oneblock Buddycraft - Oneblock Five Moon's FNaF Pack Five Moon's FNaF Pack The Milkyway SMP v1 beta (outdated) The Milkyway SMP v1 beta (outdated) Astral Titans Astral Titans Tensura Super Reincarnated Tensura Super Reincarnated MMW - Minecraft My Way MMW - Minecraft My Way Yumema SMP Yumema SMP Explorerflotte Create Explorerflotte Create Pokeheros 2 Pokeheros 2 RotomWorks RotomWorks MBS - Ocean Horror with Verity MBS - Ocean Horror with Verity Victory's land Victory's land IGGY's Warium Pack IGGY's Warium Pack TitanChronicles TitanChronicles Motors & Rotors Motors & Rotors Cannons and Cantrips - CaC Cannons and Cantrips - CaC QOL-MC QOL-MC Gentle Giant Gentle Giant Nukes R US Nukes R US Vanilla Fine Tuned + Vanilla Fine Tuned + WolfCraft: Curse of the Moon WolfCraft: Curse of the Moon BeeShield Legends BeeShield Legends Cobbletheseballs Cobbletheseballs Mechs & Mysteries Mechs & Mysteries The Powers that Be. The Powers that Be. Sky Foodie Sky Foodie Createrington Rails 'n Sails Createrington Rails 'n Sails V's Fantasy Modpack V's Fantasy Modpack Meow to Exile 2 Custom By Seraphina Meow to Exile 2 Custom By Seraphina OriMeka Energistics: One OriMeka Energistics: One The Convergence The Convergence Sneykor's Cobblemon online Sneykor's Cobblemon online Whimsy Brews Whimsy Brews Dark's Trials of the Unknown Dark's Trials of the Unknown CrazyMC - A Special Apocalypse | Apocalypse with Quests! CrazyMC - A Special Apocalypse | Apocalypse with Quests! Cobblemon - Mechanical Legends Cobblemon - Mechanical Legends Westcreek Westcreek Chunk by Chunk Advanced Chunk by Chunk Advanced Monumental Experience - Beneath the Surface Monumental Experience - Beneath the Surface Pixelmon Adventures   ( Server Pack ) Pixelmon Adventures ( Server Pack ) Barbtoria 2 Barbtoria 2 MysticalColonies MysticalColonies WALY VANILLA WALY VANILLA FOXY COZY LITE FOXY COZY LITE Kreyc's Waterworld Kreyc's Waterworld Femtomancy Femtomancy Tobinator Stream-Pack Tobinator Stream-Pack Maor The King Of The Light Maor The King Of The Light Artemiscraft: Awakening of the Elements Artemiscraft: Awakening of the Elements NinJutsu Origins NinJutsu Origins The RawffleVerse Reforged The RawffleVerse Reforged Crazy Adventure Crazy Adventure DiscoTech's Tinkers' Creations DiscoTech's Tinkers' Creations Cobblemon Epsilon Heroverse SMP - Official Server Heroverse SMP - Official Server

External Resources