Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
reconfigure

reconfigure

Configuration library for my mods

266
3
Library
Management
AboutGalleryChangelogVersions

reconfigure

A config library for my mods

Documentation Available for fabric Requires fabric api Available on Modrinth See me on GitHub Chat on Discord

Design goals

  • Uses the builder pattern so all options autocomplete. Just start with Config.builder() and autocompletion will guide you through the whole process of creating a configuration
  • Designed to be used in the field initializers of a config class
  • Does not use annotations for flexibility at runtime

Preview

Basic widgets Advanced widgets

Example definition

class DemoConfig {
    public final Config CONFIG = Config.builder("reconfigure-test")
            .serializer(Serializers.JSON)
            .build();
    public final ConfigTab DEMO_TAB = CONFIG.createTab("demo").build();
    Void HEADLINE = DEMO_TAB.createHeadline("headline");
    public final Property<String> STRING = DEMO_TAB.createStringProperty("string").defaultValue("Hello world")
            .asTextField().placeholder("Enter something").build();
    public final Property<Boolean> CHECKBOX = DEMO_TAB.createBooleanProperty("checkbox").defaultValue(true)
            .asCheckbox().build();
    public final Property<Boolean> TOGGLE_BUTTON = DEMO_TAB.createBooleanProperty("toggle_button")
            .asToggleButton().build();
    public final Property<Integer> SLIDER = DEMO_TAB.createIntegerProperty("slider").defaultValue(4).range(1,10)
            .asSlider().build();

    public final Property<DayOfWeek> CYCLE_BUTTON = DEMO_TAB
            .createEnumProperty("cycle_button", DayOfWeek.class)
            .defaultValue(DayOfWeek.MONDAY)
            .asCyclingButton()
            .build();

    public final Property<Integer> COLOR = DEMO_TAB.createIntegerProperty("color").asColorPicker().build();
    public final Property<String> EDIT_BOX = DEMO_TAB.createStringProperty("box").asEditBox().build();
    public final Property<List<String>> CHIP_LIST = DEMO_TAB.createListProperty("chiplist")
            .asChipList()
            .build();
}

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Compatibility

Minecraft: Java Edition

Platforms

Fabric

Supported environments

Client-side

Links

Report issues View source Visit wiki Join Discord server

Creators

replaceitem
replaceitem Member

Details

Licensed MIT
Published 3 months ago
Updated 6 days ago

Modrinth is open source.

main@9fd0f68

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.