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
THE ASTEROID skyblock THE ASTEROID skyblock Fortnite 3: Victory Royale Fortnite 3: Victory Royale OptimalFPS OptimalFPS Hk's Fabulous Fadda Server -Discontinued- Hk's Fabulous Fadda Server -Discontinued- Artemis Continuum Artemis Continuum CrownAotVideoPack CrownAotVideoPack The Ultimate Limitless - TUL The Ultimate Limitless - TUL - Utopia - - Utopia - SURVIVAL RPG LITE (OPTIMIZADO) SURVIVAL RPG LITE (OPTIMIZADO) Knights of the Eve Knights of the Eve EpicFantasy EpicFantasy StoneBlock Project Matter StoneBlock Project Matter Transformed Storage Transformed Storage Super Enhanced Skyblock Super Enhanced Skyblock Rivals Rivals Survival Smp Mod Pack Survival Smp Mod Pack Cobblemon Gotta Cobble 'Em All Cobblemon Gotta Cobble 'Em All This World Is Yours: The Roaring Hells This World Is Yours: The Roaring Hells MineFantasy MineFantasy Create: Build a Jurassic Park Create: Build a Jurassic Park NameIT NameIT Continuity Error SMP Modpack Continuity Error SMP Modpack Medieval Survival X - OLD Medieval Survival X - OLD Surviving The Wither Storm Surviving The Wither Storm DaD-Dinosaurios y Dragones DaD-Dinosaurios y Dragones Winter Apokalypse Winter Apokalypse Gears & Glyphs Gears & Glyphs RETURNED! RETURNED! Eternity SMP Eternity SMP FrenchCube FrenchCube Beyond Shenanigans Beyond Shenanigans Mad-Kingdoms SMP Mad-Kingdoms SMP Meteors Incoming Meteors Incoming Create Aerodynamic Create Aerodynamic LongPlay Origins LongPlay Origins Create RPG+ Create RPG+ Eldarval Drehmal Eldarval Drehmal X-Life 4 X-Life 4 Fritz's RPG Fritz's RPG Create: Perfect Cobblemon Create: Perfect Cobblemon Happy Sandwich Happy Sandwich Endless Sky 2 Endless Sky 2 All About Cobblemon - Pokemon  World ( Catch, Build, Explore ) All About Cobblemon - Pokemon World ( Catch, Build, Explore ) Mangoescraft Mangoescraft GGC recommended GGC recommended TARDIS & DRAGONS TARDIS & DRAGONS The Odyssey (Create Aeronautics & Weather mods) The Odyssey (Create Aeronautics & Weather mods) EaterSMP EaterSMP Fishing With The Boys Fishing With The Boys Two Weeks at Freddy's (FNAF) Two Weeks at Freddy's (FNAF) Flora City Furniture Flora City Furniture Farlands - Origins Of The Olimpus Farlands - Origins Of The Olimpus MessCraft: Explore The World MessCraft: Explore The World Tensura - Rebirth Tensura - Rebirth endless horror-the ultimate horror endless horror-the ultimate horror Order of the Stone Order of the Stone Bee Valley Cute Edition Bee Valley Cute Edition Nuage Guns, Vehicles and mores Nuage Guns, Vehicles and mores VOID-BOX2 VOID-BOX2 Vanilla-'s Vanilla PLUS Vanilla-'s Vanilla PLUS Create: Advanced Industries Create: Advanced Industries gone but not forgotten gone but not forgotten MakeShift MakeShift Blighted Dreams Blighted Dreams Createch 2 Createch 2 Total Pack Total Pack FNaF RP (By Fmuzyy) FNaF RP (By Fmuzyy) Westercraft Official Westercraft Official [Forge] Civilisation [Forge] Civilisation THE Walking of the parasite 2 sunrising... THE Walking of the parasite 2 sunrising... Mekacraft! Mekacraft! IncredibleCraft-[FORGE]-1.20.1 IncredibleCraft-[FORGE]-1.20.1 GHyst Distant Horizons GHyst Distant Horizons Tinkerer Kingdom Tinkerer Kingdom CloverCraft (Season 1) CloverCraft (Season 1) Tinker's Create [Fabric] Tinker's Create [Fabric] Irregulados Irregulados Modern Warfare HBM Modern Warfare HBM He Follows He Follows Tinker's Tea Time Tinker's Tea Time Cinematic Horizons (Distant Horizon with Shader) Cinematic Horizons (Distant Horizon with Shader) Cobblemon - The Temporia Region Cobblemon - The Temporia Region Project Cobblemon Collection Project Cobblemon Collection Create Next to the Sky Create Next to the Sky The Modpack of absolute all time The Modpack of absolute all time VS-Fossils and Archeology Server Pack VS-Fossils and Archeology Server Pack THE FORGOTTEN SMP THE FORGOTTEN SMP Wandering Hollows Season 2 Wandering Hollows Season 2 Farm and Friends Farm and Friends Essential Mods Nuck Essential Mods Nuck Pixelmon: Extra Adventures 2 Pixelmon: Extra Adventures 2 Age Of Assembly Age Of Assembly DPMon - Cobblemon Quest Pack DPMon - Cobblemon Quest Pack Goodfellaz Vanilla+ Goodfellaz Vanilla+ ATGC Meltdown 2 - The Sky ATGC Meltdown 2 - The Sky Stratum Stratum Creatia 3 Creatia 3 Dominion Immersive Pack Dominion Immersive Pack Vanilla+ Game Vanilla+ Game Cobblemon Sink Cobblemon Sink

External Resources