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,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
 VeritySurvival VeritySurvival LitW II - Life in the Wilds 2 LitW II - Life in the Wilds 2 PokeHub PokeHub BlazeandCave's Expanded+ BlazeandCave's Expanded+ Botania and Create Botania and Create Project AZOTH Cobblemon Modpack Project AZOTH Cobblemon Modpack Create ADDONS Create ADDONS Rizmotopia Rizmotopia Minecolonies - The Dark Ages Minecolonies - The Dark Ages Farmers Unleashed Farmers Unleashed MineColonies: Kingdoms Beyond MineColonies: Kingdoms Beyond VictoriaCraft VictoriaCraft Factor-e Void Edition Factor-e Void Edition Taproot Taproot Wondrous Wilds: Terraforged Edition Wondrous Wilds: Terraforged Edition Satisfactory Satisfactory OnePieceNewWorld OnePieceNewWorld Trash Panda Twist Trash Panda Twist Paralyzed: The Boiled One Paralyzed: The Boiled One UnBound World UnBound World Thaumic Horizon Thaumic Horizon Tensura Rise of Tempest (Tensura Reincarnated) Tensura Rise of Tempest (Tensura Reincarnated) SauroLab Create Official Pack SauroLab Create Official Pack CreateMods++ CreateMods++ Tensura Nightmare Reincarnated Tensura Nightmare Reincarnated Cozy Cooking: Humble Harvest Cozy Cooking: Humble Harvest Village & Pillage: Ultimate Village & Pillage: Ultimate  DayCraft REVAMPED DayCraft REVAMPED Weapons And Some Other Things (WASOT) Weapons And Some Other Things (WASOT) Paps Superflat 2 Multiplayer Ready Paps Superflat 2 Multiplayer Ready HardRock Apocalypse - Plagueborn (HRAP) HardRock Apocalypse - Plagueborn (HRAP) Remember Tekkit Remember Tekkit Tensura Chronicles of Tempest Tensura Chronicles of Tempest Velocity Velocity Crafttomuck Crafttomuck A Quite Place remastered A Quite Place remastered Harder Than Copper Age Harder Than Copper Age Finally a Good Tensura Server Finally a Good Tensura Server Nostalgia core (the broken script) Nostalgia core (the broken script) Kinetia Kinetia Rine Time Rine Time Create: New Age Create: New Age Fossils and Archeology Expanded: Age of Fossils Fossils and Archeology Expanded: Age of Fossils Zoompack 4 Zoompack 4 Marvel-DC Zombies Marvel-DC Zombies True: Calamity True: Calamity Cookie Pack(e4mc) Cookie Pack(e4mc) WildLouna WildLouna VR Realistic Worlds 3D Server VR Realistic Worlds 3D Server Create Coasters Create Coasters Crafted Create Crafted Create Skies of Progression Skies of Progression Dungeons and Shuttles Evolution Dungeons and Shuttles Evolution RageCraft Revived RageCraft Revived Chase the Skies Chase the Skies TheAllTimeDream TheAllTimeDream Jurassic park (jurassic park genesis sequel) Jurassic park (jurassic park genesis sequel) Brassburg SMP Modpack Brassburg SMP Modpack Weaponized: guns and all Weaponized: guns and all MineColonies-Caos e Ordem [Unnoficial] MineColonies-Caos e Ordem [Unnoficial] Furrest Modpack Furrest Modpack Surviving the Cold Surviving the Cold Pixel Pusher Pixel Pusher Tensura Resurgence Tensura Resurgence NO STRINGS ATTACHED A Survival Horror Pack NO STRINGS ATTACHED A Survival Horror Pack Kart's Chaotic Kit Kart's Chaotic Kit RiftRealm UNLIMITED RiftRealm UNLIMITED ExileColonies ExileColonies Slime Kings Reincarnation Slime Kings Reincarnation World at war World at war Xomembers LITE Xomembers LITE PROJECT SKY EMC BASED PROJECT SKY EMC BASED Modustrie Modustrie Kingdom Cordis - RP Kingdom Cordis - RP Sky Industrialization Sky Industrialization Lets Just Say CRAFT - [Christmas] (LJSC) Lets Just Say CRAFT - [Christmas] (LJSC) EVON'S BETTER CRAFT EVON'S BETTER CRAFT Bottom of The Barrel Bottom of The Barrel ArcaneAxis - ARS ArcaneAxis - ARS CobbleKingdoms CobbleKingdoms Hammercraft 40k Server Edition Hammercraft 40k Server Edition Urbanite - Minecolonies Enhanced Urbanite - Minecolonies Enhanced Ascension QoL Ascension QoL Simple Automation 2.0 | Beginner-Friendly Tech & Automation Simple Automation 2.0 | Beginner-Friendly Tech & Automation Integrated MineColonies Integrated MineColonies New Worlds Polished! New Worlds Polished! Create: Constructs of the Wild Create: Constructs of the Wild Into the Maze (Horror in your world 2025 version) Into the Maze (Horror in your world 2025 version) Jojo's Modern World! Jojo's Modern World! Horror Aeronautics with Friends Horror Aeronautics with Friends Create: SatisFactory Create: SatisFactory Wither Storm: Dawn of Legends Wither Storm: Dawn of Legends Kameritverse ( Alien Evolution ) Kameritverse ( Alien Evolution ) Replication Issues Replication Issues Cobblemon Unbound Cobblemon Unbound NovaMTR Modpack NovaMTR Modpack Erstwhile Journey Erstwhile Journey Mystic's Monstrosity - Avaricious Edition Mystic's Monstrosity - Avaricious Edition Savaru IV - Kohtalon Mies Savaru IV - Kohtalon Mies RePalmon RePalmon

External Resources