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
Prime Piece Lite Prime Piece Lite Most the Mods official Mod pack Most the Mods official Mod pack New Age Branch Line New Age Branch Line Create Woensdag - Aeronautics Create Woensdag - Aeronautics Shenanigans Shenanigans Pingwin Pack (Tech/Survival) Pingwin Pack (Tech/Survival) ABC Create - Aeronautics ABC Create - Aeronautics Cobblemon To The Skies Cobblemon To The Skies All About Factory - Industrial Tech & Automation All About Factory - Industrial Tech & Automation MENAGERIE - Paradoxical Wilds (Jurassic World based on Marvelous Menagerie) MENAGERIE - Paradoxical Wilds (Jurassic World based on Marvelous Menagerie) Eevee Isles Eevee Isles Cobblemon aBunchaMods Cobblemon aBunchaMods Stellar Warfare Stellar Warfare StormCore StormCore Absolute Industrialization Absolute Industrialization TechJourney Expert TechJourney Expert Guns, Dragons, and Death! Guns, Dragons, and Death! Arise SMP Arise SMP Comfycraft Comfycraft VtubersPlayCobblemon VtubersPlayCobblemon Nostalgia Squared Remake Nostalgia Squared Remake Zoo and Adventures Forge Edition Zoo and Adventures Forge Edition Create Coasters Create Coasters Fall of Days – Zombie Survival Fall of Days – Zombie Survival Farming Bosses Farming Bosses TerraFirmaCivilization Season 2 TerraFirmaCivilization Season 2 Donna's Odyssey Fantasy RPG Donna's Odyssey Fantasy RPG CrazyPimp Saison 1 CrazyPimp Saison 1 City Life 4.0 City Life 4.0 Create: Up and Away Create: Up and Away Crafted Chaos Crafted Chaos Cobblemon Perfected Cobblemon Perfected Create Aeronautics Survival Create Aeronautics Survival Nueral RPG Nueral RPG More Magika! More Magika! Viriatus Viriatus Voloron 4 Voloron 4 Greated Create Greated Create Gregtech Voyager Gregtech Voyager To the Stars - Etoile To the Stars - Etoile Technopolis Technopolis Lovebirds Lovebirds Create End Survival Create End Survival The Poke Isles Official Modpack The Poke Isles Official Modpack Official Dynastie Community Modpack Official Dynastie Community Modpack Paleo Project Paleo Project MewmiCraft MewmiCraft Christmas Fantasy Christmas Fantasy Mine Mine No Mi Supremacia v2 Mine Mine No Mi Supremacia v2 CleanCraft by ACUL [Neoforged] CleanCraft by ACUL [Neoforged] WUC Tensura WUC Tensura Spells Gears n' Bells RP Spells Gears n' Bells RP Imperialist - Medieval Ages Imperialist - Medieval Ages BecksCraft BecksCraft Craft and Conquer Craft and Conquer PebbleTown PebbleTown ROLO Edition ROLO Edition Create Aeronautics Age Of Aerolution Create Aeronautics Age Of Aerolution Triberean's Ultimate Furniturecraft Triberean's Ultimate Furniturecraft Impostor Syndrome - Reimagined Impostor Syndrome - Reimagined Oathbound Oathbound GeoThronesSMP GeoThronesSMP Aeternis Aeternis Dawnfern SMP Dawnfern SMP Create - Create 6.0.8 - Create VS Clockwork Create - Create 6.0.8 - Create VS Clockwork Steam & Stratosphere Steam & Stratosphere MysteriaSMP MysteriaSMP Haydenmon Evolved Haydenmon Evolved Cherry Vanilla Cherry Vanilla VACraft VACraft Frozen Horrors Frozen Horrors HallowScream 4 HallowScream 4 Fast and Better Vanilla Fast and Better Vanilla The Ferret Business 2 - Vaults of Fortune The Ferret Business 2 - Vaults of Fortune Forge & Frontier [FORGE] Forge & Frontier [FORGE] Atlas Project Atlas Project Quark's Adventures [S1] Quark's Adventures [S1] Dungeon Crawlers SMP Dungeon Crawlers SMP Project SCP (Discontinued) Project SCP (Discontinued) Mana and Metal 2.0 Mana and Metal 2.0 Jurassic Park Genesis Jurassic Park Genesis FOREVER WORLD - KRGG FOREVER WORLD - KRGG Project Eternity  A New Vision Project Eternity A New Vision Alamaos' Code: AgriTech Alamaos' Code: AgriTech Tank Booth: Mythos & Mechanica Tank Booth: Mythos & Mechanica ComboTech 4 Sky High ComboTech 4 Sky High AREACRAFT AREACRAFT Kainel Kainel AstroGregExsilium AstroGregExsilium Cobblemon Honey Academy Cobblemon Honey Academy KaijuuCraft KaijuuCraft Xomaps Decay Xomaps Decay PurgatoryMC PurgatoryMC A Crazy Adventure: Science & Survival A Crazy Adventure: Science & Survival Mechanical Infinity Mechanical Infinity Silver's Cobblemon Silver's Cobblemon Farmer's Chill Life Farmer's Chill Life All About Aether - Sky Dimension Adventure All About Aether - Sky Dimension Adventure Lucky Pixelados Lucky Pixelados Mythic Machina Mythic Machina

External Resources