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,207,405

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
Stranded N Space Stranded N Space SurShield Modification SurShield Modification The Obsessed Creature The Obsessed Creature TrollMods - Let the trolls begin! [Troll Wars] TrollMods - Let the trolls begin! [Troll Wars] Farms N' Furniture Farms N' Furniture HLStuff - Adventure & Exploration HLStuff - Adventure & Exploration whiter storm ultimate whiter storm ultimate ChillCraft  - Play Your Way, Chill Your Way ChillCraft - Play Your Way, Chill Your Way Technetium Technetium Clockwork Skies Clockwork Skies Happy Sandwich Happy Sandwich Tough As Bedrock Tough As Bedrock All About Lucky Block -  PvP & Events & RNG Madness All About Lucky Block - PvP & Events & RNG Madness Izakji's Genesis Pack Izakji's Genesis Pack Create Light (for lowend pc) Create Light (for lowend pc) InsaneCraft S2 (Fan Made) InsaneCraft S2 (Fan Made) The Crafting Dead Reimagined The Crafting Dead Reimagined InteritusCraft (post-apocalyptic survival) InteritusCraft (post-apocalyptic survival) Void Genesis: The Quantum Abyss Void Genesis: The Quantum Abyss Raft Reimagined Raft Reimagined POKEPURAM-SMP POKEPURAM-SMP VAMPACK VAMPACK Create With Friends SMP Create With Friends SMP Karmaland V (no oficial) Karmaland V (no oficial) The Rise of Newstone Hollow The Rise of Newstone Hollow RE:Rotaria RE:Rotaria Z's Deceasedcraft Lite Z's Deceasedcraft Lite Void Nomad Void Nomad AtomBombOS AtomBombOS Aeroworks Aeroworks Synergy Pokemon Synergy Pokemon Berseria Sky Berseria Sky The World Of Dinosaurs The World Of Dinosaurs Ultimate Naruto Ultimate Naruto The Conjuring: Last Rites | Horror Modpack The Conjuring: Last Rites | Horror Modpack SMARTCRAFT SMARTCRAFT MagicCraft: Choose your magic path MagicCraft: Choose your magic path Apocalipse Light - A Zombie Apocalypse Survival Apocalipse Light - A Zombie Apocalypse Survival EMC Reach For The Stars EMC Reach For The Stars Tensura Reincarnated Life In Another World Tensura Reincarnated Life In Another World Create: Gears & Guns Create: Gears & Guns New Era: A One Piece Journey New Era: A One Piece Journey Evolved Parasite Outbreak Evolved Parasite Outbreak Miracul212 Miracul212 Realistic Minecraft - Frealism Realistic Minecraft - Frealism CobbleMaster CobbleMaster Chainsaw man combat & food Chainsaw man combat & food Pixelmon Beyond the Cobbleverse Pixelmon Beyond the Cobbleverse Sky XP Sky XP SuperSMP Pack SuperSMP Pack Aerophagia (Aeronautics) Aerophagia (Aeronautics) Vampirism Extra Vampirism Extra Cuter Craft Cuter Craft JuJutsu Kaisen Rougelike JuJutsu Kaisen Rougelike Block Ops - Warfare Block Ops - Warfare MC EXPEDITIONS MC EXPEDITIONS Narutoto World of Ninjas Narutoto World of Ninjas MonCraft- Monsters and Monster Girls MonCraft- Monsters and Monster Girls war for the omnitrix war for the omnitrix Artifice & Industry Artifice & Industry The Forsaken Dawn I The Forsaken Dawn I Fiction Friction Gaming Fiction Friction Gaming medieval ages and machinery medieval ages and machinery Guns, military, and stuff Guns, military, and stuff Ultimate RP Pack 1.12.2 Ultimate RP Pack 1.12.2 Digimobs World Next Order Digimobs World Next Order Cinematic Horizons (Distant Horizon with Shader) Cinematic Horizons (Distant Horizon with Shader) Friendgroup create server Friendgroup create server BigChadGuys Plus (w/Cobblemon) // Wommii's Version BigChadGuys Plus (w/Cobblemon) // Wommii's Version Oneblock ExAqua Oneblock ExAqua More biomes! More Structures! More biomes! More Structures! Reclamation - Hardcore Edition Reclamation - Hardcore Edition Lillydale Ranch Lillydale Ranch Authentic Skies Create Authentic Skies Create Friends United 2.1 Friends United 2.1 The Size Server The Size Server Tech Town Tech Town OriTech Academy OriTech Academy Horizon (New Dawn) Horizon (New Dawn) GloveCraft Cobblemon Tycoon GloveCraft Cobblemon Tycoon Jujutsu Kaisen+ Jujutsu Kaisen+ Tensura Pandemonium Official Tensura Pandemonium Official Cobblemon Homestead Cobblemon Homestead Superflat Create Superflat Create Forge of Titans | Forge your Empire Forge of Titans | Forge your Empire Monumental Experience - NeoForge Monumental Experience - NeoForge EMC Essentials EMC Essentials From The Fog + From The Fog + AstroCraft - MC AstroCraft - MC Forge of Eternity Forge of Eternity [Map] Cobblemon Scarlet Red [Map] Cobblemon Scarlet Red Jwan's SCP tech and construction basics Jwan's SCP tech and construction basics Dino World - Jurassic Adventures Dino World - Jurassic Adventures Time Vortex TARDIS: Mechanical Marvels Time Vortex TARDIS: Mechanical Marvels Matti's Skyblock Matti's Skyblock Create - Create 6.0.8 - Create VS Clockwork Create - Create 6.0.8 - Create VS Clockwork The Createverse The Createverse ˚ʚ♡ɞ˚ Cozycraft - Farming and Animals ˚ʚ♡ɞ˚ ˚ʚ♡ɞ˚ Cozycraft - Farming and Animals ˚ʚ♡ɞ˚ Sacred Logistics Sacred Logistics Yes Nicer MC [Fabric] YNM Yes Nicer MC [Fabric] YNM

External Resources