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,105,077

CurseForge ID

438332

Modrinth Downloads

31,332,106

Modrinth ID

LN9BxssP

Last Updated

Sep 13, 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,297)

Show fewer
MC Vanilla 2.0 - QUALITY UPDATE! MC Vanilla 2.0 - QUALITY UPDATE! Dungeon Train Pack- A Lore-Rich Roguelite Adventure Dungeon Train Pack- A Lore-Rich Roguelite Adventure All the Mods 10 Aeronautics All the Mods 10 Aeronautics Beebeeblock_The_Skyhive Beebeeblock_The_Skyhive Ultimate Progression: Sky Ultimate Progression: Sky Building Tales 2 Building Tales 2 NeoForge Foundry NeoForge Foundry All The Forge All The Forge Demon SlayerCraft: Rise of the Slayers Demon SlayerCraft: Rise of the Slayers Whispers in the Void - A Horror Adventure & Quests | Horror Mobs! Whispers in the Void - A Horror Adventure & Quests | Horror Mobs! Coiso Craft Coiso Craft Ragnamod VI In the Sky Ragnamod VI In the Sky Create Re-Flavored Create Re-Flavored Cobblemon Freedom Frontiers Cobblemon Freedom Frontiers Create Evolution - With Create 6.0 and Quests! | +35 Create Addons Create Evolution - With Create 6.0 and Quests! | +35 Create Addons All Of Create All Of Create Easycraft (Official) Easycraft (Official) Little Bit Large Little Bit Large Nizco's Cobblemon Adventures 2 Nizco's Cobblemon Adventures 2 ReligiousPack3-Season2 ReligiousPack3-Season2 Lukes LukeLabs - Der Ausbruch Lukes LukeLabs - Der Ausbruch Sky Capsule Project Sky Capsule Project Create: New Horizon Create: New Horizon HP - Create World of Gears - Create 6.0.9 HP - Create World of Gears - Create 6.0.9 Chosen's Modded Adventure: Chunk by Chunk Chosen's Modded Adventure: Chunk by Chunk CreateTogether CreateTogether More Decorations [FABRIC] - 1.21 UPDATE! More Decorations [FABRIC] - 1.21 UPDATE! Farming Crossing 3 Farming Crossing 3 Horrorland - With Horror Quests! Horrorland - With Horror Quests! Cottage Craft - A Cottagecore Adventure Cottage Craft - A Cottagecore Adventure A True Prime Piece Experiance A True Prime Piece Experiance Create 101 Season 2 Create 101 Season 2 Ozone Skyblock Reborn 2 Ozone Skyblock Reborn 2 Sky Agriculture Sky Agriculture FTB Skies FTB Skies Infinite Horizons - Modded Superflat Survival Infinite Horizons - Modded Superflat Survival Vanilla Create Exploration Vanilla Create Exploration FTB OceanBlock FTB OceanBlock Beyond of the Create Beyond of the Create Dungeons, Dragons and Space Shuttles 2 Dungeons, Dragons and Space Shuttles 2 Vault Hunters Third Edition - Remastered Vault Hunters Third Edition - Remastered Haven: CaveBlock Haven: CaveBlock The Biggest Modpack The Biggest Modpack ABOE 3 - A Bit of Everything 3 ABOE 3 - A Bit of Everything 3 Delivery Inc. Delivery Inc. Realistic Colonies Realistic Colonies Creative Drawers Producer Creative Drawers Producer Craft in Chaos Craft in Chaos Rhinocraft Rhinocraft Kooplemon Kooplemon Cryptopolis Cryptopolis Naruto AHZNB  Anime Naruto AHZNB Anime Stone Technology Ultimate Stone Technology Ultimate Sky Revolutions Sky Revolutions Tinkers' Survival Official Tinkers' Survival Official [MODIFIED] Cobblemon: OVERCLOCKED! [MODIFIED] Cobblemon: OVERCLOCKED! PixelGO - To the Sky PixelGO - To the Sky RandBlock 2 Winterize RandBlock 2 Winterize Avalon Reborn Avalon Reborn 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 Rubius cobblemon Rubius cobblemon Tales Tales FreshCraft Classic FreshCraft Classic Tropical Colonies Tropical Colonies Beyond Depth Insanity Beyond Depth Insanity Create Lets Create - Official Server Create Lets Create - Official Server Prehistoric Dawn - with The Dawn Era | SERVER COMPATIBILITY! Prehistoric Dawn - with The Dawn Era | SERVER COMPATIBILITY! FXNT Create 2 FXNT Create 2 #1 One Prime Piece #1 One Prime Piece Create: Back on Track Create: Back on Track Legacies 26 Legacies 26 SkyT 2 SkyT 2 Go Create Go Create Druidic Quest: Expert Druidic Quest: Expert Tensura (Tensei Shitara Slime Datta Ken) Tensura (Tensei Shitara Slime Datta Ken) FTB NeoTech FTB NeoTech MI:Foundation MI:Foundation TechAcademy TechAcademy Winter Regrowth Winter Regrowth Ben 10: Galactic Adventures Ben 10: Galactic Adventures Back to Back Back to Back Arcane Colony: The Tinker’s Age Arcane Colony: The Tinker’s Age CrazyTown Season 3 CrazyTown Season 3 Lees Zombie Apocalypse - Fallen Earth Lees Zombie Apocalypse - Fallen Earth Dwellers Dwellers More Realistic [FABRIC] - 1.21 UPDATE! More Realistic [FABRIC] - 1.21 UPDATE! Project SkyQ 2 Project SkyQ 2 Enigmatic Skies Enigmatic Skies Prison Escape - Beginnings Prison Escape - Beginnings Create Block - Everything in the sky Create Block - Everything in the sky Legacies Legacies The Fallen World - Prehistoric Corruption The Fallen World - Prehistoric Corruption Remade And Remastered Remade And Remastered Compitum Magia Compitum Magia WANKIL CRAZY : LWI WANKIL CRAZY : LWI Space Craft (Galacticraft) Space Craft (Galacticraft) Chroma Endless Chroma Endless EMC SubTerra Tech EMC SubTerra Tech Elden Block Elden Block

External Resources