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
Create the Server Create the Server Horror OneBlock Horror OneBlock Medival, Magic & Tech Forge Medival, Magic & Tech Forge Apocalypse Begins [Zombie Apocalypse] Apocalypse Begins [Zombie Apocalypse] FWF LuckyBlocks FWF LuckyBlocks Avaritia Project Avaritia Project Beyond Fantasy - A Magic RPG Modpack Beyond Fantasy - A Magic RPG Modpack Just Hide - A Ransomware Horror Experience (Inspired by Twixxel & Thatmob) Scary Stalker Gameplay Recreation Modpack Just Hide - A Ransomware Horror Experience (Inspired by Twixxel & Thatmob) Scary Stalker Gameplay Recreation Modpack SMP | Somake Server SMP | Somake Server Create Overlord Aeronautics Update Create Overlord Aeronautics Update Farming Overloaded Farming Overloaded AtlanAbyss AtlanAbyss Create: Civilizations - C:C Create: Civilizations - C:C Stacia Stacia CivilizationPack CivilizationPack How to train your Dragon: The Third Part How to train your Dragon: The Third Part Factory in the Sky 4 Factory in the Sky 4 Thormen 1.21.1 - Mekanism -  Spaceships -  ICBMs -  Force Fields -  Nuclear Science  -  Voltz successor - Modpack server running Thormen 1.21.1 - Mekanism - Spaceships - ICBMs - Force Fields - Nuclear Science - Voltz successor - Modpack server running Faruk V Faruk V Melatonin Melatonin Cobblemon Kanto Map (abandoned) Cobblemon Kanto Map (abandoned) Fishing Block Fishing Block FairyTALES FairyTALES Cozy Cooking: Delicious Decor Cozy Cooking: Delicious Decor Cute Cottage Craft Cute Cottage Craft SeriousFirmaCraft (TFC + Create) SeriousFirmaCraft (TFC + Create) Create 2 Mekanism 2: Sky Edition Create 2 Mekanism 2: Sky Edition FuzeIII Season6 Modpack FuzeIII Season6 Modpack Steller: The Rise of the Kingdom Steller: The Rise of the Kingdom Aphmau's Roleplay Aphmau's Roleplay JJK Extra Cursed Fate JJK Extra Cursed Fate Create Cobblemon-ised Create Cobblemon-ised TJP - Endless Sky TJP - Endless Sky Sky Frogs Sky Frogs knight epic fight knight epic fight Xomaps Potato Master Xomaps Potato Master Beyond Crazycraft Beyond Crazycraft TRUE RTX TRUE RTX Factorio: Nuclear (OxMODPACK) Factorio: Nuclear (OxMODPACK) Extraordinary Energy : Modern Extraordinary Energy : Modern Magic Sky Magic Sky Ores, Gears & Backpacks Ores, Gears & Backpacks CRETANIA CRETANIA POKEFUN - The Ultimate Pokemon Adventure [Cobblemon} POKEFUN - The Ultimate Pokemon Adventure [Cobblemon} Birds Car Birds Car Cobblemon - Master Mon Cobblemon - Master Mon Moonstruck's Rebirth - A Better Cozy Experience Moonstruck's Rebirth - A Better Cozy Experience GregFactory Sky GregFactory Sky Mystical Atherculture - A 100 Days Adventure Mystical Atherculture - A 100 Days Adventure GregTech:New Beginnings GregTech:New Beginnings Rise of Tech 2 Rise of Tech 2 Devouring The World Devouring The World Create: Aeronautical Crafting Create: Aeronautical Crafting A New Technological Era A New Technological Era Cursed Project - Zombie Apocalypse Cursed Project - Zombie Apocalypse Ars Nouveau Discord Server Ars Nouveau Discord Server Crashed Crashed Create: Clockwork+ [Forge] Create: Clockwork+ [Forge] Gloomy  Rise Gloomy Rise A little bit of Shaders and More A little bit of Shaders and More Unique-Social Build Your City 2 Unique-Social Build Your City 2 Tech Spirit Tech Spirit All the furniture. All the furniture. CobblemonOneBlock CobblemonOneBlock Terramity Awakened Terramity Awakened Better Horror Better Horror Fantastic Frontier Fantastic Frontier Aero's One Piece Event Aero's One Piece Event Official MineColonies Special Events Official MineColonies Special Events Minecraft - Fantasy Alive Minecraft - Fantasy Alive Fresh & Cozy Fresh & Cozy Servidor Magnatas Servidor Magnatas SmashMC Cobblemon SmashMC Cobblemon Survive in the Sky Survive in the Sky Project Minecolonies United Project Minecolonies United Cottage World Cottage World Realm of Destiny Realm of Destiny Alex's Caves: Adventures Plus Alex's Caves: Adventures Plus Era Do Futuro 2025 Era Do Futuro 2025 HTTYD: Hiccups legacy HTTYD: Hiccups legacy RPG Plus RPG Plus Shinobi-Craft Shinobi-Craft Fantasy Vs. Science Quarks & Magic Fantasy Vs. Science Quarks & Magic Fantazy Tech Fantazy Tech The Kingdom of Daldar  [New Adventure Remade - Fabric] The Kingdom of Daldar [New Adventure Remade - Fabric] Ocean Depths Ocean Depths ChunkBound ChunkBound Arcane Twilight Arcane Twilight BeanPack: Regurgitated BeanPack: Regurgitated Immersive Nukes Immersive Nukes Axiom's Adventure Tech Experience Axiom's Adventure Tech Experience Create Bosses+ Create Bosses+ Create x Valkyriensky's Create x Valkyriensky's HyCraft - Fantasy and RPG (Inspired by Hytale) | Hytale in Minecraft with Quests HyCraft - Fantasy and RPG (Inspired by Hytale) | Hytale in Minecraft with Quests Create - Forge Frontier Create - Forge Frontier MagiCraft4 - The Curse of Ignis MagiCraft4 - The Curse of Ignis QSMP 2024 FANMADE QSMP 2024 FANMADE QSMP 2 Community Edition QSMP 2 Community Edition Progressionistic Progressionistic JoJo's Bizzare Craft JoJo's Bizzare Craft

External Resources