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
ES CRAFT ES CRAFT DragLed Optimized DragLed Optimized SubCraft Rebirth SubCraft Rebirth Reclamation - Hardcore Edition Reclamation - Hardcore Edition Echoes of Volkrune - Rebirth of Order Echoes of Volkrune - Rebirth of Order Survival : Create OneBlock Survival : Create OneBlock Silly Billy Femboy Activities Pack Silly Billy Femboy Activities Pack Create: Power Unleashed Create: Power Unleashed Trial of the Void Trial of the Void Create & Destroy Create & Destroy Backtanked Backtanked ALBOE! [FABRIC] ALBOE! [FABRIC] Harder Than Copper Age Harder Than Copper Age Createrington Cogs & Steam Createrington Cogs & Steam VanillaEnhancedCraft VanillaEnhancedCraft Tensura Reincarnated Life In Another World Tensura Reincarnated Life In Another World The Next Tomorrow Cobblemon (NO LONGER IN USE) The Next Tomorrow Cobblemon (NO LONGER IN USE) Elemental Engineering Elemental Engineering Macaw's Nest Macaw's Nest Create: Guns and Artillery Create: Guns and Artillery Most Of The Mods Most Of The Mods Velocity Velocity Life as a Villager Life as a Villager TussleCraft - Forgotten Age TussleCraft - Forgotten Age Kingdoms Hardcore PvP Kingdoms Hardcore PvP Apocalyptic Hardcore: The World of SCP Infection ☠️ Apocalyptic Hardcore: The World of SCP Infection ☠️ Modern Apocalypse: Zombie Edition Modern Apocalypse: Zombie Edition SCP: Blackout Protocol SCP: Blackout Protocol Minecolonies - Order and Chaos Minecolonies - Order and Chaos MHG: Cities! MHG: Cities! Miracul212 Miracul212 Tensura Tainted Grace Tensura Tainted Grace Multiversal Misadventures - The Blockhead's Guide to the Galaxy Multiversal Misadventures - The Blockhead's Guide to the Galaxy Create&Greg Create&Greg Zombotony - Zombie Apocalypse Zombotony - Zombie Apocalypse BuildCraft Lite BuildCraft Lite Create:Mechanism and Innovation Create:Mechanism and Innovation Everwild (Cobblemon) Everwild (Cobblemon) Aeronautics-The Create Dream Aeronautics-The Create Dream Kameritverse ( Alien Evolution ) Kameritverse ( Alien Evolution ) Astrid's FNAF Pack - Management Wanted Astrid's FNAF Pack - Management Wanted Gear Spinned Gear Spinned Synergy Pokemon Synergy Pokemon VictoriaCraft VictoriaCraft Planes Trains and Cobblemon Planes Trains and Cobblemon Cobblemon: Ultra Modded Cobblemon: Ultra Modded MysticCraft Divivded Kingdoms MysticCraft Divivded Kingdoms Gearspack Gearspack Economycraft Economycraft NovaMTR Modpack NovaMTR Modpack Gaymer's Pack Gaymer's Pack Cobblemon Journeys End Cobblemon Journeys End OmniCraft Evolved OmniCraft Evolved KRILLKRAFT KRILLKRAFT Tornado Surviving Tornado Surviving Artemis: Project Artemis: Project Marvel-DC Zombies Marvel-DC Zombies StaTech Industry: GoG StaTech Industry: GoG Cherry Shrooms Cherry Shrooms VisualCraft by Moizoref VisualCraft by Moizoref Craft Complimentary Craft Complimentary True: Calamity True: Calamity SpHiNxX's Technical Overhaul SpHiNxX's Technical Overhaul Builders Delight 4 Builders Delight 4 Mystical Realms - A Modded Server Mystical Realms - A Modded Server The Last of us-Zombie Survival The Last of us-Zombie Survival Semi Realistic Space Exploration Modpack Semi Realistic Space Exploration Modpack Agritech Skies Agritech Skies Howiecraft Howiecraft Sky Tekkin 2 Sky Tekkin 2 ImmersiveMC - IMC1 ImmersiveMC - IMC1 One Piece: Grand Voyage One Piece: Grand Voyage FoxMagic FoxMagic Alien Revolution 10 Alien Revolution 10 Apocalyptic infection - Zombie invasion Apocalyptic infection - Zombie invasion Herobrine's Haunt: Defend & Survive Herobrine's Haunt: Defend & Survive Mythic RPG : Reborn Realms Mythic RPG : Reborn Realms Dracium Create Edition Dracium Create Edition Atelier Mythos Era Atelier Mythos Era Farmtastic! Farmtastic!  Industrialized Industrialized SkyTech Evolution SkyTech Evolution Max's Flashback Max's Flashback The Catgirl Experience The Catgirl Experience Tensura Pandemonium Official Tensura Pandemonium Official Server Pack: M-HELDEN 2 Server Pack: M-HELDEN 2 Chronicles of Arcadia: A Journey to Magitech [CAJM] Chronicles of Arcadia: A Journey to Magitech [CAJM] Create-Anything Create-Anything Chime Time IX Chime Time IX Furtastic (a changed adventure) Furtastic (a changed adventure) Project: TFCreate Project: TFCreate All In One Extended by Wazon All In One Extended by Wazon Futurecraft 5.0 Futurecraft 5.0 Tekkit Classic - A Rebirth Tekkit Classic - A Rebirth Winter Arc Winter Arc Almost enough content Almost enough content ProsperityCraft ProsperityCraft ProjectS ProjectS Dimensional Cultivation Dimensional Cultivation Galaxy Sky Galaxy Sky

External Resources