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,201,320

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
CobblemonOneBlock CobblemonOneBlock RPG Plus RPG Plus Reverie Foundry Reverie Foundry Magic Sky Magic Sky TRUE RTX TRUE RTX CobbleVerse + (For servers with friends) CobbleVerse + (For servers with friends) Moonstruck's Rebirth - A Better Cozy Experience Moonstruck's Rebirth - A Better Cozy Experience Ores, Gears & Backpacks Ores, Gears & Backpacks Birds Car Birds Car A New Technological Era A New Technological Era Rise of Tech 2 Rise of Tech 2 Arphex Experience Arphex Experience Servidor Magnatas Servidor Magnatas Cursed Project - Zombie Apocalypse Cursed Project - Zombie Apocalypse Create Bosses+ Create Bosses+ Mystical Atherculture - A 100 Days Adventure Mystical Atherculture - A 100 Days Adventure Finality Industries - Omnia Finality Industries - Omnia Ars Nouveau Discord Server Ars Nouveau Discord Server Realm of Destiny Realm of Destiny Official MineColonies Special Events Official MineColonies Special Events Fresh & Cozy Fresh & Cozy A little bit of Shaders and More A little bit of Shaders and More Bleach awaken Bleach awaken Unique-Social Build Your City 2 Unique-Social Build Your City 2 Project Minecolonies United Project Minecolonies United Better Horror Better Horror Chaos OneBlock Chaos OneBlock Minecraft - Fantasy Alive Minecraft - Fantasy Alive Create: Basically Everything Create: Basically Everything New Age Science and Technology hard New Age Science and Technology hard EMC & FE +++ EMC & FE +++ Era Do Futuro 2025 Era Do Futuro 2025 Kabbalah Block Kabbalah Block Tech Spirit Tech Spirit Fantasy Vs. Science Quarks & Magic Fantasy Vs. Science Quarks & Magic Immersive Nukes Immersive Nukes The Kingdom of Daldar  [New Adventure Remade - Fabric] The Kingdom of Daldar [New Adventure Remade - Fabric] Survive in the Sky Survive in the Sky Dungeons and Bosses [1.20.1] Dungeons and Bosses [1.20.1] HTTYD: Hiccups legacy HTTYD: Hiccups legacy BeanPack: Regurgitated BeanPack: Regurgitated The Christmas Chronicles The Christmas Chronicles Train Yard Train Yard Arcane Twilight Arcane Twilight Beyond Zombie Beyond Zombie You Like Food? You Like Food? Create x Valkyriensky's Create x Valkyriensky's Axiom's Adventure Tech Experience Axiom's Adventure Tech Experience Progressionistic Progressionistic HyCraft - Fantasy and RPG (Inspired by Hytale) | Hytale in Minecraft with Quests HyCraft - Fantasy and RPG (Inspired by Hytale) | Hytale in Minecraft with Quests CuteCraft [FABRIC] CuteCraft [FABRIC] FreshCraft Fantasy DLC FreshCraft Fantasy DLC Fantazy Tech Fantazy Tech Egged Up Egged Up Ultimate Slayer - Demon Slayer Ultimate Slayer - Demon Slayer QSMP 2 Community Edition QSMP 2 Community Edition Factory in the Sky 3 Factory in the Sky 3 Farro's and Archeology Farro's and Archeology Jaffa Factory 2 Jaffa Factory 2 QSMP 2024 FANMADE QSMP 2024 FANMADE OPSkies 2 OPSkies 2 Arcreux - Enhanced Pixelmon Arcreux - Enhanced Pixelmon Project Nope Zone Project Nope Zone Creative Drawers Producer 2 Creative Drawers Producer 2 JoJo's Bizzare Craft JoJo's Bizzare Craft MagiCraft4 - The Curse of Ignis MagiCraft4 - The Curse of Ignis Builder's Toolbox | Best Building Experience Builder's Toolbox | Best Building Experience Cobblemon & Origins SMP Cobblemon & Origins SMP Star Space Ages Star Space Ages Fallout Winter Wasteland Fallout Winter Wasteland New One Piece Era New One Piece Era Cozy Meadows Cozy Meadows Comes Alive & The Autumn Days Comes Alive & The Autumn Days MOXCRAFT MOXCRAFT Basic VR Immersion Basic VR Immersion Path of Truth Path of Truth GregTech New Frontier GregTech New Frontier MultiSkyBlock 2 MultiSkyBlock 2 UMA New World UMA New World Plastek 2 Plastek 2 Pixelcraft Equestrian Pixelcraft Equestrian Horizon (RU) Horizon (RU) [DD&D] Dungeons Dragons & Dimensions [DD&D] Dungeons Dragons & Dimensions Volormon Volormon All The Forge 9 All The Forge 9 Project Create 1.20 Project Create 1.20 Mystical Block 2 Mystical Block 2 Nuclear Tech Reborn Nuclear Tech Reborn Time 2 Time 2 All The Mario All The Mario Create:Infinity Mechanism Create:Infinity Mechanism mrfazbear's sonicraft pack mrfazbear's sonicraft pack Civilization-L Civilization-L Survival Reimagined: Bring back Survival in Minecraft Survival Reimagined: Bring back Survival in Minecraft AllCreateMods AllCreateMods Soulheart Cobblemon Soulheart Cobblemon Create Aeronautics Expanded Create Aeronautics Expanded Compact World Expert Compact World Expert World Of Big Horror World Of Big Horror Summer Apocalypse - Zombie Curse Summer Apocalypse - Zombie Curse

External Resources