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,194,977

CurseForge ID

438332

Modrinth Downloads

33,926,244

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
Ultimate Progression Ultimate Progression Better FPS & Visuals Boost FPS (Forge) Better FPS & Visuals Boost FPS (Forge) Vault Hunters Third Edition - Remastered Vault Hunters Third Edition - Remastered Azuria RockBlock 3 Azuria RockBlock 3 Whispers in the Void - A Horror Adventure & Quests | Horror Mobs! Whispers in the Void - A Horror Adventure & Quests | Horror Mobs! Kingdoms and Colonies Rebirth Kingdoms and Colonies Rebirth FNAF - Fazcraft Reimagined | Based on FNAF! FNAF - Fazcraft Reimagined | Based on FNAF! Create Evolution - With Create 6.0 and Quests! | +35 Create Addons Create Evolution - With Create 6.0 and Quests! | +35 Create Addons Compression Compression The Immersive Revolution: Rebirth The Immersive Revolution: Rebirth Beyond Viltrum - Invincible Inc Beyond Viltrum - Invincible Inc All the Mods - Gravitas - ATMG All the Mods - Gravitas - ATMG The Legend Of 2900 The Legend Of 2900 Werewolves VS Vampires SMP Werewolves VS Vampires SMP Holycube Revolution Holycube Revolution Valhelsia: Origins Valhelsia: Origins Mystic's Monstrosity Mystic's Monstrosity Create Live 6 Create Live 6 World Terra World Terra Symbolica Symbolica Ozone Skyblock Reborn 2 Ozone Skyblock Reborn 2 Cobblemon Freedom Frontiers Cobblemon Freedom Frontiers HP - Create World of Gears - Create 6.0.9 HP - Create World of Gears - Create 6.0.9 MC Vanilla 2.0 - QUALITY UPDATE! MC Vanilla 2.0 - QUALITY UPDATE! All The Forge All The Forge Ultimate Progression: Sky Ultimate Progression: Sky Infinite Horizons - Modded Superflat Survival Infinite Horizons - Modded Superflat Survival Building Tales 2 Building Tales 2 Kooplemon Kooplemon NeoForge Foundry NeoForge Foundry Demon SlayerCraft: Rise of the Slayers Demon SlayerCraft: Rise of the Slayers Dungeons, Dragons and Space Shuttles 2 Dungeons, Dragons and Space Shuttles 2 Easycraft (Official) Easycraft (Official) Coiso Craft Coiso Craft Create: New Horizon Create: New Horizon Ragnamod VI In the Sky Ragnamod VI In the Sky Create Re-Flavored Create Re-Flavored Chosen's Modded Adventure: Chunk by Chunk Chosen's Modded Adventure: Chunk by Chunk Little Bit Large Little Bit Large Create - Forge Frontier Create - Forge Frontier A True Prime Piece Experiance A True Prime Piece Experiance Nizco's Cobblemon Adventures 2 Nizco's Cobblemon Adventures 2 Sky Capsule Project Sky Capsule Project Cottage Craft - A Cottagecore Adventure Cottage Craft - A Cottagecore Adventure Lukes LukeLabs - Der Ausbruch Lukes LukeLabs - Der Ausbruch ReligiousPack3-Season2 ReligiousPack3-Season2 CreateTogether CreateTogether Farming Crossing 3 Farming Crossing 3 More Decorations [FABRIC] - 1.21 UPDATE! More Decorations [FABRIC] - 1.21 UPDATE! FTB Skies FTB Skies FTB OceanBlock FTB OceanBlock Sky Agriculture Sky Agriculture Create 101 Season 2 Create 101 Season 2 StaTech Industry 2 StaTech Industry 2 Vanilla Create Exploration Vanilla Create Exploration Desecrated - Flesh and Blood Desecrated - Flesh and Blood Lees Zombie Apocalypse - Fallen Earth Lees Zombie Apocalypse - Fallen Earth Beyond of the Create Beyond of the Create Haven: CaveBlock Haven: CaveBlock Naruto AHZNB  Anime Naruto AHZNB Anime The Biggest Modpack The Biggest Modpack ABOE 3 - A Bit of Everything 3 ABOE 3 - A Bit of Everything 3 Realistic Colonies Realistic Colonies Delivery Inc. Delivery Inc. Creative Drawers Producer Creative Drawers Producer Rhinocraft Rhinocraft Craft in Chaos Craft in Chaos antarchy craft antarchy craft #1 One Prime Piece #1 One Prime Piece Cryptopolis Cryptopolis Rubius cobblemon Rubius cobblemon Tinkers' Survival Official Tinkers' Survival Official RandBlock 2 Winterize RandBlock 2 Winterize Sky Revolutions Sky Revolutions Stone Technology Ultimate Stone Technology Ultimate Create Eternal Journey Create Eternal Journey [MODIFIED] Cobblemon: OVERCLOCKED! [MODIFIED] Cobblemon: OVERCLOCKED! Adventure of Tech VI Adventure of Tech VI Beyond Depth Insanity Beyond Depth Insanity Tales Tales Changed + Changed + PixelGO - To the Sky PixelGO - To the Sky Avalon Reborn Avalon Reborn Terramity Awakened Terramity Awakened Worldly Galaxies 4 | Multiplayer Questing Modpack (1200+ QUESTS) Worldly Galaxies 4 | Multiplayer Questing Modpack (1200+ QUESTS) Hunting Monsters The Witcher Modpack Hunting Monsters The Witcher Modpack Prehistoric Dawn - with The Dawn Era | SERVER COMPATIBILITY! Prehistoric Dawn - with The Dawn Era | SERVER COMPATIBILITY! Create Lets Create - Official Server Create Lets Create - Official Server FreshCraft Classic FreshCraft Classic Tropical Colonies Tropical Colonies Druidic Quest: Expert Druidic Quest: Expert Create: Back on Track Create: Back on Track FTB NeoTech FTB NeoTech FXNT Create 2 FXNT Create 2 Legacies 26 Legacies 26 SkyT 2 SkyT 2 Tensura (Tensei Shitara Slime Datta Ken) Tensura (Tensei Shitara Slime Datta Ken) Legacies Legacies Better Create Aeronautics | Create Aeronautics with Create Addons & Improvements Better Create Aeronautics | Create Aeronautics with Create Addons & Improvements Enigmatic Skies Enigmatic Skies

External Resources