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
KrzakiPudlo_3.5: Pixelmon Edition KrzakiPudlo_3.5: Pixelmon Edition Legends of the Unown [NEOFORGE] Legends of the Unown [NEOFORGE] Cobblemon Unbound Cobblemon Unbound Modularity: Industrial Progress - (M:I1) Modularity: Industrial Progress - (M:I1) Dungeon Legends Dungeon Legends Multi Pocket Dimensions Multi Pocket Dimensions Dynamic Odyssey Dynamic Odyssey Builder's Toolbox [Fabric Edition] | Best Building Experience Builder's Toolbox [Fabric Edition] | Best Building Experience Gangsta's Parasite apocalypse Gangsta's Parasite apocalypse Bombastic Fantastic World Experience Bombastic Fantastic World Experience Create Computers Create Computers NPLX - Modern Beta NPLX - Modern Beta Arctania SMP Arctania SMP Equal Sky! Equal Sky! Horror but Guns Horror but Guns SurShield Modification SurShield Modification Forge of the Ages Forge of the Ages The Pookie Bears The Pookie Bears Legends & Lands – Structures, Ores, Items, and More Legends & Lands – Structures, Ores, Items, and More Rick's Portal Gun - Official Server Pack Rick's Portal Gun - Official Server Pack Create: Cogs & Cataclysm Create: Cogs & Cataclysm World at war World at war JoJos Requiem JoJos Requiem Sage's Custom Cisco Sage's Custom Cisco Create Perfectionn Create Perfectionn RareLabs Colonies RareLabs Colonies Crashed Phoenix Crashed Phoenix AdvoTech ValkyrienSkies (abandoned) AdvoTech ValkyrienSkies (abandoned) The Great Beyond The Great Beyond EldenVoid EldenVoid Cobblemon Vulkan (Performance Pack) Cobblemon Vulkan (Performance Pack) Sky Universal Create Sky Universal Create Cobblemon Empire Cobblemon Empire Create: Beyond Industry 2 [FORGE] Create: Beyond Industry 2 [FORGE] Create And Stuff With Friends Create And Stuff With Friends Cobblemon: Path Of Legends Cobblemon: Path Of Legends Rabbit's FNAF pack Rabbit's FNAF pack All About Create - Automation & Mechanicals Tech All About Create - Automation & Mechanicals Tech Protocol Zero-(HARDCORE EDITION) Protocol Zero-(HARDCORE EDITION) Management Wanted Expansion Management Wanted Expansion Farming Across the Skies Farming Across the Skies Applied Energestic 2 vs Refined Storage Neoforged Applied Energestic 2 vs Refined Storage Neoforged Zenavia Cobblemon Academy Zenavia Cobblemon Academy Lancy's Wither Storm Lancy's Wither Storm Pixverse Pixverse Mines & Monarchs (M&M) Mines & Monarchs (M&M) The Bright Side Of Create The Bright Side Of Create Creatorio Supply Chain Creatorio Supply Chain Rapha´s Christmas Pack Rapha´s Christmas Pack Create a War Create a War Projet Nouveau Monde Steel Ball No Run [jojo] Projet Nouveau Monde Steel Ball No Run [jojo] Create: Constructs of the Wild Create: Constructs of the Wild FEARCRAFT [FORGE JAVA] 1.19.2 FEARCRAFT [FORGE JAVA] 1.19.2 Terra by Sexy Crew Terra by Sexy Crew Create: SatisFactory Create: SatisFactory Integrated RPG Integrated RPG Fun n' Guns Fun n' Guns Cobblemon Adventure V2 Cobblemon Adventure V2 Create Revamped Server Create Revamped Server SinnoH Sanctum Old SinnoH Sanctum Old Bingus SMP Season 9 Aeronautics Bingus SMP Season 9 Aeronautics Yendia's Quality Of Life [Forge] Yendia's Quality Of Life [Forge] LebaneseMC LebaneseMC Rob's Cobblemon Academy Rob's Cobblemon Academy Vlofast's "Create-Ing" World Vlofast's "Create-Ing" World Path to Exile - Next Generation Path to Exile - Next Generation The Incy Experience The Incy Experience All You Need - AYN All You Need - AYN FEARNIGHT [FORGE JAVA] FEARNIGHT [FORGE JAVA] Automating Auto Automating Auto MYLP's Create CobbleStories - A Create Adventure CobbleStories - A Create Adventure ReCraft S8 Project infinity 0.1 ReCraft S8 Project infinity 0.1 LuxeCraft SMP LuxeCraft SMP Lite Sky Exchange (LSE) Lite Sky Exchange (LSE) MuratCraft v2 MuratCraft v2 Jojo: Bedrock is Unbreakable Jojo: Bedrock is Unbreakable NeoBox NeoBox Verity souls JE Verity souls JE Create-Mekanism Perfect Balance Create-Mekanism Perfect Balance (D&D Addition) (D&D Addition) New Age Science and Technology hard New Age Science and Technology hard play.Create-SMP.com play.Create-SMP.com Frisky Business: Powercraft Edition 2 Frisky Business: Powercraft Edition 2 Prime Piece Adventure Prime Piece Adventure Biomes, Construction, and Exploration Biomes, Construction, and Exploration Create: Aloft Create: Aloft JujutsuCraft: Curse Chronicles JujutsuCraft: Curse Chronicles Dragonlands Dragonlands Create Colonies - Craft a Home. Create an Empire. Create Colonies - Craft a Home. Create an Empire. Kitchen Sink (Emphasis on the Kitchen) Kitchen Sink (Emphasis on the Kitchen) Farmageddon Farmageddon Soulcraft‎‎‏‏‎ ‎ Soulcraft‎‎‏‏‎ ‎ Cute Adventure Cute Adventure Catch, Create, Conquer Catch, Create, Conquer Magic and dungeoneering Magic and dungeoneering HugoSMP HugoSMP HunterZ - GussDX Edition HunterZ - GussDX Edition Project 202 Project 202 Alfheim | Guns & Monsters Alfheim | Guns & Monsters

External Resources