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,105,077

CurseForge ID

438332

Modrinth Downloads

31,332,106

Modrinth ID

LN9BxssP

Last Updated

Sep 13, 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,297)

Show fewer
E.A.L Cozy Farming Pack E.A.L Cozy Farming Pack Create: Factory Builder Create: Factory Builder ElysiumCraft Rp ElysiumCraft Rp CREATE and COLONY - Better features with Create and MineColonies CREATE and COLONY - Better features with Create and MineColonies Cottage Craft Cottage Craft City Life: Lumina City City Life: Lumina City Changed + Changed + New Game 3 - Immersive RPG Adventures & RPG Quests New Game 3 - Immersive RPG Adventures & RPG Quests coEBLmon coEBLmon Ultra Hardcore Renewed - Do you dare to play it? | 1.21 UPDATE! Ultra Hardcore Renewed - Do you dare to play it? | 1.21 UPDATE! Blackstone Block Blackstone Block Aeropolis Aeropolis bleach soul society renewed bleach soul society renewed Crazy Crave 5 Crazy Crave 5 Rising Civilizations Rising Civilizations Monumental Experience - In the Sky Monumental Experience - In the Sky Calamity RPG III : Wounds of the World Calamity RPG III : Wounds of the World Moe's Spooky Jump-scare Simulator Moe's Spooky Jump-scare Simulator WinterCraft-Eternal Winter! WinterCraft-Eternal Winter! Cobblemon Factory (Now with all 1025 pokemon!) Cobblemon Factory (Now with all 1025 pokemon!) Create 2 Mekanism Create 2 Mekanism Furniture & Tech Furniture & Tech Ultra Distant Horizons Ultra Distant Horizons Tardis Engineers 2 Tardis Engineers 2 Ender's Journey - Beyond The End Ender's Journey - Beyond The End Magitech Fantasia Magitech Fantasia Fight or Blight Fight or Blight Uncharted Expeditions Uncharted Expeditions Jurassic World Reborn 2 LITE Jurassic World Reborn 2 LITE Create Sky Colonies - Valkyrian Skies X Create 6.0 Create Sky Colonies - Valkyrian Skies X Create 6.0 Danknum Opus Danknum Opus More Animals 2 - Exclusive Edition with Animals Quests! More Animals 2 - Exclusive Edition with Animals Quests! CrazyCraft Revived CrazyCraft Revived SkyColonies Ultimate Pack SkyColonies Ultimate Pack Avalon Cobblemon Oficial Avalon Cobblemon Oficial Mekanism: Automation Mekanism: Automation Terrafirma Engineering Terrafirma Engineering Journey to Dawn [RU] Journey to Dawn [RU] Lost_Civilization:Wilds Lost_Civilization:Wilds Majnr Skyblock Majnr Skyblock Magic Valley Magic Valley Avatar Mod 2: Out of the Iceberg Adventure! Avatar Mod 2: Out of the Iceberg Adventure! WT Endless Sky Adventures - Skyblock Edition WT Endless Sky Adventures - Skyblock Edition Medieval Horizons (Distant Horizons) Medieval Horizons (Distant Horizons) InsaneCraft "Modest" (LITE) InsaneCraft "Modest" (LITE) Security Point Security Point Elixir Elixir Lightly Balanced OneBlock Lightly Balanced OneBlock Project Isothermal Expert Project Isothermal Expert Shadow Awakening Shadow Awakening Crazier Crazy Craft Crazier Crazy Craft BM: Exosphere Community Edition BM: Exosphere Community Edition Sky of Grind Sky of Grind Fantasy MC Forge Fantasy MC Forge project-1193210 project-1193210 Epic Castle Siege Epic Castle Siege RealCraft RealCraft Multiblock Madness 2 Multiblock Madness 2 BM: Exosphere Lite BM: Exosphere Lite White Shrimp's Great Adventure White Shrimp's Great Adventure More Decorations 2 - Exclusive Edition | Decoration Mods! More Decorations 2 - Exclusive Edition | Decoration Mods! Cosmic Frontiers Cosmic Frontiers Towns & Kingdoms 2 | A New World Towns & Kingdoms 2 | A New World Haven: Caveblock - Reborn Haven: Caveblock - Reborn Fallen Realms Fallen Realms Isle of Berk Expanded Isle of Berk Expanded Primal Apocalypse - Unusual Survival with Dinosaurs, Guns and Quests | Prehistoric Apocalypse Primal Apocalypse - Unusual Survival with Dinosaurs, Guns and Quests | Prehistoric Apocalypse Parasites, SCPs, Guns, and More Parasites, SCPs, Guns, and More sky1234 sky1234 Mechanical Mastery Plus Mechanical Mastery Plus Create Combined Create Combined EMC: Space Age EMC: Space Age More Dungeons [FABRIC] - 1.21 UPDATE! More Dungeons [FABRIC] - 1.21 UPDATE! Create Expansion - Bigger Create+ | 6.0 UPDATE! Create Expansion - Bigger Create+ | 6.0 UPDATE! Lunaria Expert Lunaria Expert Ragnamod VII In The Sky Ragnamod VII In The Sky LunarFox LunarFox A-Pokémon-Pack: Obsidian Edition A-Pokémon-Pack: Obsidian Edition The Faewoods - An Aesthetic Fairy World The Faewoods - An Aesthetic Fairy World Strictly Medieval [ FORGE ] 2 Strictly Medieval [ FORGE ] 2 World of Minecraft Normal World of Minecraft Normal Shiner's Black Clover Shiner's Black Clover [CTM] Let's Cobble these Mons - a Cobblemon modpack [CTM] Let's Cobble these Mons - a Cobblemon modpack The Last War - Guns And Adventure The Last War - Guns And Adventure Sculk Horde Survival Sculk Horde Survival Portal SkyCraft Portal SkyCraft More Biomes [FABRIC] - 1.21 UPDATE! More Biomes [FABRIC] - 1.21 UPDATE! Everwind - RPG & Survival Everwind - RPG & Survival Path of the Ascended Path of the Ascended FEARCRAFT  [FORGE JAVA] FEARCRAFT [FORGE JAVA] New Simple Mods [FABRIC] - Without Complex Mods! | NEW VERSION! New Simple Mods [FABRIC] - Without Complex Mods! | NEW VERSION! MARSHYVERSE OFFICIAL SERVER - 1.12.2 RETURNS MARSHYVERSE OFFICIAL SERVER - 1.12.2 RETURNS Echoes of Nostalgia - Expert Echoes of Nostalgia - Expert Level Border Level Border My Hero Academia New Heros My Hero Academia New Heros MineColonies - Cobblemon Conquest MineColonies - Cobblemon Conquest All The Dungeons | New Combat and Dungeons All The Dungeons | New Combat and Dungeons FreshCraft SteamPunk Industry DLC FreshCraft SteamPunk Industry DLC Solo Leveling - OVERLOAD Solo Leveling - OVERLOAD Essential Full Potential Essential Full Potential

External Resources