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,489,953

CurseForge ID

438332

Modrinth Downloads

31,454,882

Modrinth ID

LN9BxssP

Last Updated

Sep 15, 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,307)

Show fewer
guns and vihicles guns and vihicles minna no saba minna no saba Goon Crew Collection VR Goon Crew Collection VR Project Resonance - Ancient City Project Resonance - Ancient City Redstone Witch [Lite] Redstone Witch [Lite] CreateSMP Aeronautics CreateSMP Aeronautics Tiganj - Dark Fantasy RPG Tiganj - Dark Fantasy RPG Better Hypixel Experience Better Hypixel Experience capybara’s play oritech capybara’s play oritech The Guild: Create+ SMP The Guild: Create+ SMP EinsEinundzwanzigElf EinsEinundzwanzigElf MyPleasure MyPleasure Realms Collide Eternal Realms Collide Eternal Vikti's Farming Pack Vikti's Farming Pack Daldon's Immersive Survival Daldon's Immersive Survival medieval smp S4 medieval smp S4 MafiaCraft MafiaCraft Christmas Modpack (yeah) Christmas Modpack (yeah) Cosmotech Cosmotech Survival Refined Survival Refined DLI Moderately Modded Minecraft, Meals, Magic & Machinery DLI Moderately Modded Minecraft, Meals, Magic & Machinery Creating Sandwiches Creating Sandwiches WorldsEnd WorldsEnd Draconic Machinations Draconic Machinations Pixel Valley Pixel Valley Dominion Basics pack Dominion Basics pack Properly Optimized // [1.3.2] Properly Optimized // [1.3.2] Mostly Create! Mostly Create! Apotheosis Pack 3 Apotheosis Pack 3 Crafting and Many More Crafting and Many More FTC - Indie Games FTC - Indie Games TKS SMP TKS SMP Bordered Bordered Tales of Horizon Tales of Horizon Blue Angel Blue Angel GoatCraft BMC++ 4 [Forge] GoatCraft BMC++ 4 [Forge] Cave Factory --Reimagined-- Cave Factory --Reimagined-- WrightCraft WrightCraft Create: Tesseracted Create: Tesseracted AeroCobble AeroCobble Empyrean Expansion Empyrean Expansion [XM] xK0KLIN Modpack's [XM] xK0KLIN Modpack's Tropical Paradise Tropical Paradise Overcrafto Overcrafto DFN - SMP DFN - SMP Everhaven Everhaven Shipwrecked SMP Shipwrecked SMP Pherocraft Pherocraft Creator's Delight 3 Creator's Delight 3 RainbowMon 2 RainbowMon 2 Rust and Rituals Rust and Rituals Syntex Gaming Community Syntex Gaming Community Fungalitus Fungalitus TUIA (The Ultimate Indefinite Adventure) TUIA (The Ultimate Indefinite Adventure) Terraero Terraero Master Farmer's Master Farmer's Aeronautic Colonies Aeronautic Colonies Retriever's Epic Fight Retriever's Epic Fight Yggdrasil 2 New Age Yggdrasil 2 New Age Azelie Azelie Pino 4 Pino 4 Grietina Grietina Jhotonheim Cobblemon Jhotonheim Cobblemon Society Sunlit Valley Enhanced Society Sunlit Valley Enhanced full crate full crate Create Reiterated - S2 Create Reiterated - S2 RossAndrewsVT's Medieval Project [Discontinued] RossAndrewsVT's Medieval Project [Discontinued] Holy Magical Création Holy Magical Création A Place to Call Home A Place to Call Home Francis IV Francis IV Neos Colony Neos Colony Braincells Magical Creation Braincells Magical Creation Nouveau Monde Nouveau Monde A MAFIA SMP A MAFIA SMP The Meat Must Grow The Meat Must Grow Nationcraft by Emmet Nationcraft by Emmet Best Survival Modpack For Latest Version Best Survival Modpack For Latest Version Electricmon Electricmon Gergapack III Gergapack III Instant Assault [Create + TacZ] Instant Assault [Create + TacZ] Willow's Random RPG Willow's Random RPG Rebirth RPG Rebirth RPG Homer Pack Homer Pack Wyrdworks Wyrdworks ZenCobblemon ZenCobblemon Dwarfz Fantasy Dwarfz Fantasy NewPath - Echoes of the Wild NewPath - Echoes of the Wild Cauchemar Cauchemar Better, Faster, Fancier Better, Faster, Fancier Progress - Selects Progress - Selects A creative decorating dream. Create structures according to your imagination. A creative decorating dream. Create structures according to your imagination. ProhlisCraft 4: Return of the Prohlisgang! ProhlisCraft 4: Return of the Prohlisgang! Goon Wars Goon Wars ED-Projekt ED-Projekt Create Earth Collection Create Earth Collection Scoobyland - Create and Friends Scoobyland - Create and Friends MironMC - Cobblemon MironMC - Cobblemon Above SMP Above SMP Tensura Waka Edition Tensura Waka Edition HORYZONEA HORYZONEA

External Resources