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
Cobblemon Vulkan Cobblemon Vulkan Dinos, Dragons, and Demons Dinos, Dragons, and Demons HLStuff - Adventure & Exploration HLStuff - Adventure & Exploration The Size Server The Size Server Explorer's Feast | 探索者的盛宴 Explorer's Feast | 探索者的盛宴 The Forsaken Dawn I The Forsaken Dawn I Karmaland V (no oficial) Karmaland V (no oficial) FriendsCraft - Designed for Multiplayer | Vanilla-Friendly FriendsCraft - Designed for Multiplayer | Vanilla-Friendly medieval ages and machinery medieval ages and machinery Ultimate RP Pack 1.12.2 Ultimate RP Pack 1.12.2 Forge of Titans | Forge your Empire Forge of Titans | Forge your Empire The OneBlock 1 The OneBlock 1 TNT Titans TNT Titans Z's Deceasedcraft Lite Z's Deceasedcraft Lite The Crafting Dead Reimagined The Crafting Dead Reimagined Chronicles of Magic | The First Magician Chronicles of Magic | The First Magician All About Horror - Survival Fear & Terror Experience All About Horror - Survival Fear & Terror Experience TrollMods - Let the trolls begin! [Troll Wars] TrollMods - Let the trolls begin! [Troll Wars] Permadeath+ Permadeath+ Technetium Technetium Artifice & Industry Artifice & Industry SMARTCRAFT SMARTCRAFT GloveCraft Cobblemon Tycoon GloveCraft Cobblemon Tycoon Lone-Leveler (A Solo-Leveling Modpack) Lone-Leveler (A Solo-Leveling Modpack) Cultivator's Legacy Cultivator's Legacy Clockwork Skies Clockwork Skies Jujutsu Kaisen+ Jujutsu Kaisen+ Araxer's: Ages - Staged Survival Araxer's: Ages - Staged Survival Void Genesis: The Quantum Abyss Void Genesis: The Quantum Abyss BigChadGuys Plus (w/Cobblemon) // Wommii's Version BigChadGuys Plus (w/Cobblemon) // Wommii's Version Dieselpunkery Dieselpunkery OPKoffee Infused OPKoffee Infused Friends United 2.1 Friends United 2.1 BM - Exosphere 2 Lite BM - Exosphere 2 Lite Cuter Craft Cuter Craft [Map] Cobblemon Scarlet Red [Map] Cobblemon Scarlet Red Lillydale Ranch Lillydale Ranch Jwan's SCP tech and construction basics Jwan's SCP tech and construction basics Just Forever Just Forever Fossils And Archaeology: Survival Refined Fossils And Archaeology: Survival Refined Create and colony - Create Aeronautics version! Create and colony - Create Aeronautics version! Oneblock ExAqua Oneblock ExAqua All About Lucky Block -  PvP & Events & RNG Madness All About Lucky Block - PvP & Events & RNG Madness Superflat Create Superflat Create Lord of the Rings Mythic Medieval Vibe Lord of the Rings Mythic Medieval Vibe From The Fog + From The Fog + MagicCraft: Choose your magic path MagicCraft: Choose your magic path Create: Gears & Guns Create: Gears & Guns Project X (Palladium) Project X (Palladium) Time Vortex TARDIS: Mechanical Marvels Time Vortex TARDIS: Mechanical Marvels Crafted Madness: Modern Era Crafted Madness: Modern Era Crafting Craft 2 Crafting Craft 2 Better Aeternium Better Aeternium Sacred Logistics Sacred Logistics JuJutsu Kaisen Rougelike JuJutsu Kaisen Rougelike Tech Town Tech Town Yes Nicer MC [Fabric] YNM Yes Nicer MC [Fabric] YNM VAMPACK VAMPACK Authentic Skies Create Authentic Skies Create OriTech Academy OriTech Academy Realisticraft - The Realistic Experience Realisticraft - The Realistic Experience Clockwork Engineers-3 Clockwork Engineers-3 OceanBlock - Skyblock Reinvented OceanBlock - Skyblock Reinvented FalCraft | The Ultimate Falsity Experience FalCraft | The Ultimate Falsity Experience OUR-HEALTH OUR-HEALTH R.M. Apocalyptic Zombies R.M. Apocalyptic Zombies Flourish & Flutter: A Nature’s Journey Flourish & Flutter: A Nature’s Journey AstroCraft - MC AstroCraft - MC Better Yogbox Better Yogbox The Valley - Sunlit Valley Expanded The Valley - Sunlit Valley Expanded Create With Friends SMP Create With Friends SMP Smooth Matcha Smooth Matcha Sugar's Ultimate Changed Sugar's Ultimate Changed MC EXPEDITIONS MC EXPEDITIONS Essentials:Create Essentials:Create The World Of Dinosaurs The World Of Dinosaurs Aerophagia (Aeronautics) Aerophagia (Aeronautics) Architecture & Automatum Architecture & Automatum SCP Cursed SCP Cursed Matti's Skyblock Matti's Skyblock Greg-E Greg-E how_To_Train_Your_ dragon how_To_Train_Your_ dragon NightRein SMP NightRein SMP Dino World - Jurassic Adventures Dino World - Jurassic Adventures Create - Ultimate OneBlock Create - Ultimate OneBlock Abnormal World - A Psychological Horror Experience Abnormal World - A Psychological Horror Experience war for the omnitrix war for the omnitrix Beyond Survival (BYSL) Beyond Survival (BYSL) Baldi's Purge Pack Baldi's Purge Pack Guns, military, and stuff Guns, military, and stuff Create: Warzone Create: Warzone KOTD KOTD Create: Snow & Steel Create: Snow & Steel FleshPunk - A Biopunk Modpack FleshPunk - A Biopunk Modpack New Age Science and Technology  Easy New Age Science and Technology Easy AOT : Attack on Titain AOT : Attack on Titain Digimobs World Next Order Digimobs World Next Order AtomBombOS AtomBombOS MonCraft- Monsters and Monster Girls MonCraft- Monsters and Monster Girls SuperSMP Pack SuperSMP Pack

External Resources