Mineuniverse
Mods
QoLib

QoLib

MOD
Prerequisites for mods created by Quantum8060
by Quantum8060
Download Claim this project
178 downloads
0 likes
0 followers
Updated Oct 14, 2026
0 hypes
Follow0
API and Library
Advertisement Remove ads with Premium →

QoLib

Shared utilities for Quantum8060's Fabric mods.

Client Config API

The first QoLib API is a client-only JSON config store. Its public types do not expose Minecraft classes, so consumer mods may use either Mojang or Yarn mappings.

private static final ConfigValue<Boolean> ENABLED = ConfigValue.booleanValue("enabled", false);
private static final ClientConfig CONFIG = ClientConfig.builder("viewer-mod")
    .add(ENABLED)
    .build();

// In ClientModInitializer#onInitializeClient:
CONFIG.load();

ENABLED.set(true);
CONFIG.save();

Supported value types are boolean, ranged integer, ranged decimal, string, and enum. Config files are stored at config/<mod-id>.json. Invalid or missing fields use their declared defaults. Saving uses a temporary file and atomic replacement when available.

The API keeps persistence separate from the settings screen, so values can also be changed through key bindings or other client logic.

Settings screen

Use config.screen("Title") to define categories, toggles, sliders, numeric fields, and action buttons. build(parent) returns a Screen for a Mod Menu config-screen factory. The screen stages changes until Save; Cancel leaves the config intact. The search box searches labels and descriptions across every category.

return CONFIG.screen("Viewer Mod")
    .category("general", "General", menu -> menu
        .toggle("Enabled", "Save received chunks", ENABLED)
        .integerSlider("Radius", "Chunks to capture", RADIUS, 1, 16)
        .integerField("Maximum files", "Archive limit", MAX_FILES))
    .category("tools", "Tools", menu -> menu
        .button("Clear cache", "Deletes the local cache", ViewerCache::clear))
    .build(parent);
QoLib-1.0.0+26.2.jar
MC Client, Fabric, 26.2
Release 2026-08-11 Get
QoLib-1.0.0+1.21.11.jar
MC Client, Fabric, 1.21.11
Release 2026-08-09 Get

More from Quantum8060

Advertisement Remove ads with Premium →

You Might Also Like