Logo
MINECRAFTBIBLE
Items
Items

All game items

Blocks
Blocks

Building blocks

Mobs
Mobs

Creatures & monsters

Biomes
Biomes

World biomes

Structures
Structures

Generated structures

Recipes
Recipes

Crafting guides

Advancements
Advancements

Achievements

Loot Tables
Loot Tables

Drop rates

Tags
Tags

Item groupings

All Versions
View all data →
Capes
Cape ArchiveNEW

Browse rare Minecon capes, OptiFine capes, and custom capes from players worldwide

Browse

Player Database
Player DatabasePopular

Search any player

Skin Browser
Skin Browser

Browse & download skins

Cape Gallery
Cape GalleryNEW

Minecon & OptiFine capes

Seed Vault
Seed Vault

Curated seeds

Learn

Guides
GuidesNew

Tutorials & tips

Blog
Blog

News & updates

Community

Community Hub
Community HubHub

Posts, discussions & more

All Versions
View community →
Seed Analyzer
Seed Analyzer

World seed analysis

Loot Explorer
Loot Explorer

Drop rates

Crafting Calculator
Crafting Calculator

Material planning

Enchant Calculator
Enchant Calculator

Probability math

Redstone Lab
Redstone Lab

Signal timing

Trading Profit
Trading Profit

Villager ROI

All Versions
View all tools →
Mods
Mods

Browse all mods

Plugins
Plugins

Server plugins

Resource Packs
Resource Packs

Textures & sounds

Shaders
Shaders

Visual enhancements

Datapacks
Datapacks

World logic

Scanner
Mod Intelligence

Scan & analyze any mod

All Versions
View all mods →
Loading...
IntroductionIntroductionVersion HistoryVersion HistoryGuidesGuidesBlog & NewsBlog & News
ItemsItemsBlocksBlocksMobsMobsRecipesRecipesBiomesBiomesStructuresStructuresAdvancementsAdvancementsLoot TablesLoot TablesTagsTags
ModsModsPluginsPluginsResource PacksResource PacksShadersShadersDatapacksDatapacks

MinecraftBible

The Ultimate Wiki

Logo
MINECRAFTBIBLE

The ultimate Minecraft reference. Every item, block, mob, and recipe documented with precision.

Community

  • Skin Browser
  • Cape Gallery
  • Seed Vault
  • Blog
  • Guides

Database

  • Items
  • Blocks
  • Mobs
  • Recipes
  • Biomes
  • Structures

Tools

  • Seed Analyzer
  • Mod Intelligence
  • Crafting Calculator
  • Enchant Calculator

Mods & Packs

  • Mods
  • Plugins
  • Resource Packs
  • Shaders
  • Datapacks

Site & Legal

  • About
  • Authors
  • Editorial Policy
  • Corrections
  • Contact
  • Privacy Policy
  • Terms of Service
  • DMCA
  • Sitemap

© 2026 MinecraftBible. Not affiliated with Mojang or Microsoft.

PrivacyTermsContact
DACL
ModMIT

DACL

DumbassConfigLib is a config library used for my mods

129
Downloads
0
Followers
7 months ago
Updated
📦
3
Versions
libraryfabric
Download Latestv1.2View on Modrinth

📖About DACL

DumbassConfigLib is a config library that is used for my mods. If you're a mod developer you can easily implement this library yourself.

Java API

To start using the library first include it in your build.gradle:

repositories {
    ...
    maven {
        name = "KaseToatz"
        url = "https://maven.kasetoatz.com/"
    }
}

dependencies {
    modCompileOnly "com.kasetoatz:dumbassconfiglib:${project.dacl_version}"
}

Then add dacl_version to your gradle.properties, you can check the version on the versions page.

Creating options

Start by creating your mod entrypoint, make sure it implements ModInitializer. You can then add your options as public static fields to this class to access them later. You can create options like so:

public static final BoolOption TEST_BOOL_OPT = new BoolOption(Text.literal("Test boolean option"), "test_bool_opt", false);
public static final IntOption TEST_INT_OPT = new IntOption(Text.literal("Test integer option"), "test_int_opt", 1);
public static final FloatOption TEST_FLOAT_OPT = new FloatOption(Text.literal("Test float option"), "test_float_opt", 1.F);

The first parameter is the text displayed in the config UI, the second parameter is the unique identifier of the option and the third parameter is the default value.

Then add this class to your fabric.mod.json so it loads at start:

"entrypoints": {
    "main": [
        "com.kasetoatz.mymod.MyMod"
    ]
}

You can replace main with client or server if your mod is client/server side only.

Validators

For options with an input field you can add a fourth parameter with an AbstractValidator to add restrictions to the option's value. To create an integer option that must be between 1 and 100 we can do that like this:

public static final IntOption CLAMPED_INT_OPT = new IntOption(Text.literal("Clamped integer option"), "clamp_int_opt", 50, new RangeValidator<>(1, 100));

You can also pass null to either the lower or higher bound in RangeValidator to remove that restriction.

Building the config

When you're finished creating your options it's time to actually build your config. You can do this using the static builder method of DumbassConfig like so:

public static final DumbassConfig CONFIG = DumbassConfig.builder(Text.literal("Test Screen Title"), "filename.json")
    .withOption(TEST_BOOL_OPT)
    .withOption(TEST_INT_OPT)
    .withOption(TEST_FLOAT_OPT)
    .build()

After building the config, the respective AbstractOption's values are changed when the config is modified, so you can always access them by doing:

bool enabled = TEST_BOOL_OPT.getValue();

Sub options

You can also add sub options that are basically an entirely new screen with it's own options. To create this we can use the builder method of the SubOption class. We will use CLAMPED_INT_OPT as one of the sub options.

public static final SubOption TEST_SUB_OPT = SubOption.builder(Text.literal("Sub Screen Title"), "sub_opt")
    .withOption(CLAMPED_INT_OPT)
    .build();

We can now add this option to the config builder aswell. We can nest these sub options however deep we want.

Modmenu support

To add our newly created config screen to modmenu, we must first add it as a dependency to our mod, you can read how to do so here.

Now we create a new class for our mod menu integration, implement ModMenuApi into this class and override getModConfigScreenFactory to return our config UI.

public class ModMenuIntegration implements ModMenuApi
{
    @Override
    public ConfigScreenFactory<?> getModConfigScreenFactory()
    {
        return CONFIG::getUI;
    }
}

Now we can modify our fabric.mod.json to set our new class as a modmenu entrypoint:

"entrypoints": {
    "main": [
        "com.kasetoatz.mymod.MyMod"
    ],
    "modmenu": [
      "com.kasetoatz.mymod.ModMenuIntegration"
    ]
}

Full Example

public class MyMod implements ModInitializer
{
    public static final BoolOption TEST_BOOL_OPT = new BoolOption(Text.literal("Test boolean option"), "test_bool_opt", false);
    public static final IntOption TEST_INT_OPT = new IntOption(Text.literal("Test integer option"), "test_int_opt", 1);
    public static final FloatOption TEST_FLOAT_OPT = new FloatOption(Text.literal("Test float option"), "test_float_opt", 1.F);
   
    public static final IntOption CLAMPED_INT_OPT = new IntOption(Text.literal("Clamped integer option"), "clamp_int_opt", 50, new RangeValidator<>(1, 100));
    public static final SubOption TEST_SUB_OPT = SubOption.builder(Text.literal("Sub Screen Title"), "sub_opt")
        .withOption(CLAMPED_INT_OPT)
        .build();

    public static final DumbassConfig CONFIG = DumbassConfig.builder(Text.literal("Test Screen Title"), "filename.json")
        .withOption(TEST_BOOL_OPT)
        .withOption(TEST_INT_OPT)
        .withOption(TEST_FLOAT_OPT)
        .withOption(TEST_SUB_OPT)
        .build()

    @Override
    public void onInitialize()
    {
        ...
    }
}
public class ModMenuIntegration implements ModMenuApi
{
    @Override
    public ConfigScreenFactory<?> getModConfigScreenFactory()
    {
        return CONFIG::getUI;
    }
}

Looking for a fun place to play Minecraft and try out some of my mods? Come hang out on the El Basurero SMP!

  • IP: play.ebsmp.com
  • Recommended Version: 1.21.11 (other versions work too!)
  • Bedrock Edition: Supported
  • Bonus: Test out most of my server-side mods live in-game!

👥 Team & Contributors

KaseToatz1337
KaseToatz1337Owner

⚙️ Compatibility

Environment
❓ Unknown
Loaders
fabric
Minecraft Versions
1.21.10

🔗 Links

Modrinth Page