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,207,405

CurseForge ID

438332

Modrinth Downloads

33,930,942

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
Benji's StardewCraft - Farming and Town Management Benji's StardewCraft - Farming and Town Management Quantum Skies Quantum Skies All The Neoforge All The Neoforge Create: Spectral Cuisine Create: Spectral Cuisine SimplePack 4 SimplePack 4 Luminary Cove Luminary Cove Rick's Portal Gun - Official Server Pack Rick's Portal Gun - Official Server Pack Create - Ultimate OneBlock Create - Ultimate OneBlock BlazeandCave's Expanded BlazeandCave's Expanded ANTIMATTER FACTORY ANTIMATTER FACTORY Lucky World Invasion - Survivor Lucky World Invasion - Survivor Blockalypse - A Modern Zombie Apocalypse Blockalypse - A Modern Zombie Apocalypse Stargate: ReLeveled Stargate: ReLeveled Project 4J Project 4J Stormforge: Never Ending Rain! Stormforge: Never Ending Rain! Telos Telos Beyond Survival (BYSL) Beyond Survival (BYSL) Better Survival (BSurvival) Better Survival (BSurvival) AOTBT Updated (1.12.2) AOTBT Updated (1.12.2) HTTYD  Hiccups Legacy Remasterd HTTYD Hiccups Legacy Remasterd Voltz (Volts) Reborn 1.12.2 Voltz (Volts) Reborn 1.12.2 Penumbralcraft Penumbralcraft All About Decoration - Building & Furniture All About Decoration - Building & Furniture Jujutsucraft Arai Jujutsucraft Arai Advanced Weaponry Advanced Weaponry Tensura Tomfoolery Tensura Tomfoolery Complete Essential Complete Essential Literally All of Create Literally All of Create PS Homegrown - Sunlit Valley PS Homegrown - Sunlit Valley ArmyCraft ArmyCraft MC:SM Ultimate Experience Refresh! MC:SM Ultimate Experience Refresh! Level Border 2.0 Level Border 2.0 Unaltered+ Unaltered+ The Modded Rizoma MC The Modded Rizoma MC Super Stupidity Super Stupidity AdvoTech JJThunder AdvoTech JJThunder Skytisfactory Skytisfactory Cobblemon Guapisimo Cobblemon Guapisimo Dusty Hell Dusty Hell Tinker's Tavern: Cobblemon Tinker's Tavern: Cobblemon Wuxiacraft the Immortal Era Wuxiacraft the Immortal Era Minecolonies Create - Aeronautics Colonies Minecolonies Create - Aeronautics Colonies [Cobblemon] BlockeMon [Cobblemon] BlockeMon A Dweller Christmas A Dweller Christmas StarkPanzer's Magical Create StarkPanzer's Magical Create Minenufactory Minenufactory Compact Sky: Easy Compact Sky: Easy FTB Unstable 6 FTB Unstable 6 Oritech+ | Oritech & Create Addons and Create Aeronautics Oritech+ | Oritech & Create Addons and Create Aeronautics QoL Client QoL Client Rats, Caves & Cogwheels ( An Alex's Caves Modpack ) Rats, Caves & Cogwheels ( An Alex's Caves Modpack ) LifeOre Create S1 LifeOre Create S1 Monumental Experience - In space Monumental Experience - In space Waifu H [MCW] Waifu H [MCW] Cats MC++ | Boss Progression | Quests | Customized Loot | Balanced Gameplay Cats MC++ | Boss Progression | Quests | Customized Loot | Balanced Gameplay Beyond Elysium Beyond Elysium AdventureCrafts [Fabric] AdventureCrafts [Fabric] SkyPlus (w Cobblemon) SkyPlus (w Cobblemon) The Createville Pack The Createville Pack Vanilla Modded (Tekkit 3) Vanilla Modded (Tekkit 3) Revelations 3 - just Tech N' building! Revelations 3 - just Tech N' building! The Sims Updated The Sims Updated Create Colonies- A Perfect World 2 Extension Create Colonies- A Perfect World 2 Extension Bloody Skyblock Bloody Skyblock Luna's SWEM (Starter) Luna's SWEM (Starter) Demon's Tech, Magic and Superheroes Demon's Tech, Magic and Superheroes Dungeon Warfare - FUN RPG | Firearms and RPG! Dungeon Warfare - FUN RPG | Firearms and RPG! Qearioz's Optimized PvP & SMP Qearioz's Optimized PvP & SMP Best Distant Horizons Experience Best Distant Horizons Experience Cobblemon Optimised Cobblemon Optimised Picky Picky brassy's epic RPG brassy's epic RPG VampirCraft VampirCraft PocketSMP (OFFICIAL) PocketSMP (OFFICIAL) Pepu's Shrimp Game Project Pepu's Shrimp Game Project Volormon Volormon ForgottenWinter_legacy ForgottenWinter_legacy Essentials Mods - Halloween Edition [CurseForge Server] Essentials Mods - Halloween Edition [CurseForge Server] Prison Escape - Beginnings (reborn) Prison Escape - Beginnings (reborn) Creatopia Unbound Creatopia Unbound Industrial Machines Industrial Machines Craft a Family Craft a Family Dokuta Suton (Dr. Stone) Dokuta Suton (Dr. Stone) Tensura Roguelike Tensura Roguelike Create and Clockwork Airships Create and Clockwork Airships Create & Farmer's Delight + Create & Farmer's Delight + Architecture & Automatum Architecture & Automatum Randomized Craft (DEEP FRIED) Randomized Craft (DEEP FRIED) Inferno - Better Hardcore Inferno - Better Hardcore Myriad Dimensional Forge [SenDims BanForges] Myriad Dimensional Forge [SenDims BanForges] Moni&ProjectE Moni&ProjectE Create: Magic Adventures Create: Magic Adventures Create+ Cars and tanks! Create+ Cars and tanks! Lumen Packs Lumen Packs Sus Craft Sus Craft DIS IS OneBlock DIS IS OneBlock The Rebirth of Nevermine The Rebirth of Nevermine Ladys Magical Decocraft Ladys Magical Decocraft SCP Revival - SCPRP SCP Revival - SCPRP Transportcraft Next Generation Transportcraft Next Generation

External Resources