SuperMartijn642's Config Lib

SuperMartijn642's Config Lib

Config Lib makes dealing with config files just a bit easier.

by
30.0M Downloads
fabricforgeneoforgequiltlibrary
Rent Server with this Mod

About this Mod

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.


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.
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, 1.16, 1.17, 1.18, and 1.19.


Example Mod:

For a concrete example of how to use Config Lib checkout the example mod.


FAQ

Can I use your mod in my modpack?
Yes, feel free to use my mod in your modpack


Discord

For future content, upcoming mods, and discussion, feel free to join the SuperMartijn642 discord server!

Available Versions

SuperMartijn642's Config Library 1.1.8release
MC 26.2fabric, quilt
June 23, 2026
SuperMartijn642's Config Library 1.1.8release
MC 26.1, 26.1.1, 26.1.2fabric, quilt
June 23, 2026
SuperMartijn642's Config Library 1.1.8release
MC 26.2forge
June 23, 2026
SuperMartijn642's Config Library 1.1.8release
MC 26.1, 26.1.1, 26.1.2forge
June 23, 2026
SuperMartijn642's Config Library 1.1.8release
MC 26.2neoforge
June 23, 2026

How to Install SuperMartijn642's Config Lib on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (26.2).

3

Install Mod

Open the mod browser in the dashboard and search for "SuperMartijn642's Config Lib". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabricforgeneoforgequilt

Minecraft Versions

26.2, 26.1.2, 26.1.1 (+47 more)

Server-side

~ Optional

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

SuperMartijn642's Config Lib server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.2). You can switch loaders with one click in the panel.

Is SuperMartijn642's Config Lib compatible with fabric and forge and neoforge and quilt?

SuperMartijn642's Config Lib officially supports fabric, forge, neoforge, quilt for Minecraft 26.2, 26.1.2, 26.1.1. Note: Forge and Fabric mods are NOT cross-compatible – pick one loader and stick with it. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with SuperMartijn642's Config Lib – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if SuperMartijn642's Config Lib consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install SuperMartijn642's Config Lib with just one click on your server.

Recommended RAM
4 GBfrom €5.2/mo
Minimum 3 GB | per 8 players
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-All-Rights-Reserved
Server-side
Optional

Supported Versions

26.226.1.226.1.126.11.21.111.21.101.21.91.21.81.21.71.21.6+40 more