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

191,222,300

CurseForge ID

438332

Modrinth Downloads

33,931,933

Modrinth ID

LN9BxssP

Last Updated

Nov 7, 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> specialValue = builder.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

Client Fabric Server Quilt

Game Versions

26.3

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,564)

Show fewer
Creating Sandwiches Creating Sandwiches BloodBath 2 BloodBath 2 RainbowMon 2 RainbowMon 2 Lotus Mods Lotus Mods EmberHorizon's Custom Pack EmberHorizon's Custom Pack Rust and Rituals Rust and Rituals KarmaCraft Chaos & bleibender Schaden KarmaCraft Chaos & bleibender Schaden The Silly Shenanigoons - Barebones REDUX The Silly Shenanigoons - Barebones REDUX PokeCube PokeCube Pvp Optimized Pack Pvp Optimized Pack Creator's Delight 3 Creator's Delight 3 Braincells: Back to Basics Braincells: Back to Basics Horror Pokemom Horror Pokemom Age of the Flood Age of the Flood The Artisan Frontiers The Artisan Frontiers Farm&Explore Farm&Explore Advanced Space and Beyond Advanced Space and Beyond Starfall Skies Starfall Skies Create Craft 4 Create Craft 4 All Those Tech All Those Tech Wen's Create Experience Wen's Create Experience Range's Pack Range's Pack KA&AL Magic KA&AL Magic Mostly Create! Mostly Create! Infinite Mayhem Infinite Mayhem RossAndrewsVT's Medieval Project [Discontinued] RossAndrewsVT's Medieval Project [Discontinued] Craft Attack 14 Pack Craft Attack 14 Pack Resurgence of the Damned: Further West Resurgence of the Damned: Further West Willow's Random RPG Willow's Random RPG InfinityMidCraft InfinityMidCraft Nic YOLO's Pixelmon 2 Nic YOLO's Pixelmon 2 Francis IV Francis IV Nouveau Monde Nouveau Monde AeroCobble AeroCobble Create's Colonies Create's Colonies Kosmosschrott Aeronautics Kosmosschrott Aeronautics Empyrean Expansion Empyrean Expansion Sleepy Bestows: Arthropod Armageddon Sleepy Bestows: Arthropod Armageddon Homer Pack Homer Pack Starborne create Starborne create CreateRatinized CreateRatinized Industrial Skies pack Industrial Skies pack Jurassic Park Genesis Jurassic Park Genesis Trial by Farmer Trial by Farmer Beyond Depth ( Zenith's Way ) Beyond Depth ( Zenith's Way ) HTTYD x Epic Fight HTTYD x Epic Fight Better Hypixel Experience Better Hypixel Experience PokeHarvest PokeHarvest Cobblezados Cobblezados Create World (Aeronautics) Create World (Aeronautics) Create SMP Marrdoxx Create SMP Marrdoxx Pixel Valley Pixel Valley WrightCraft WrightCraft Atom & Dragon Atom & Dragon Headstone Craft Headstone Craft Chernobyl all years(UPDATE!!) Chernobyl all years(UPDATE!!) Cobblemon Honey Academy Cobblemon Honey Academy A Toca da Coruja Modpack - Lite A Toca da Coruja Modpack - Lite Minecolonies Create Aeronautics Minecolonies Create Aeronautics Tensura:R ++ Tensura:R ++ [XM] xK0KLIN Modpack's [XM] xK0KLIN Modpack's Create: Tesseracted Create: Tesseracted Create & Additions Create & Additions Trademarked Trademarked Casual Chaos Cobble & Cloud [Cobblemon & Create] Casual Chaos Cobble & Cloud [Cobblemon & Create] SPW Modpack SPW Modpack FTC - Indie Games FTC - Indie Games Industrialization Lite Industrialization Lite The Living World The Living World So This Is Life As A Freak. So This Is Life As A Freak. Sublime Experience Sublime Experience CobbleCafe Oficial CobbleCafe Oficial Pherocraft Pherocraft Mococoa Mococoa Better, Faster, Fancier Better, Faster, Fancier OuiOuiCreate 2 OuiOuiCreate 2 Everlong Everlong RoboCraft The Modded World RoboCraft The Modded World Cobblemon Cursed Lake Cobblemon Cursed Lake Sky Energy Tech Sky Energy Tech TUIA (The Ultimate Indefinite Adventure) TUIA (The Ultimate Indefinite Adventure) Perfect Medieval MC Perfect Medieval MC CloverMTR CloverMTR BounceCraft: ModernConflict BounceCraft: ModernConflict Backrooms 71 Backrooms 71 Blue Angel Blue Angel Crafting and Many More Crafting and Many More Jhotonheim Cobblemon Jhotonheim Cobblemon Doctor Who, Reborn! Doctor Who, Reborn! Dwarfz Fantasy Dwarfz Fantasy Overcrafto Overcrafto Depressed_Rabbit's FNAF pack Depressed_Rabbit's FNAF pack Renovated II Renovated II Azelie Azelie Show me the Fantastic Create Show me the Fantastic Create CPBR's Create & Collaborate CPBR's Create & Collaborate Glimmerglen Hollow Glimmerglen Hollow The Basin: Skies the Limit! The Basin: Skies the Limit! Holy Magical Création Holy Magical Création KastiCraft Cobblemon x Create KastiCraft Cobblemon x Create

External Resources