ReLib

ReLib

General-purpose Minecraft mod library, also powering Rere's mods

by
5 Downloads
fabriclibrary
Rent Server with this Mod

About this Mod

ReLib

General-purpose utility library for Fabric mods, originally built for TheSmoothRere's mods but open for anyone to use.

Features

  • Config system — Define configuration classes with the @Config annotation
  • Auto-discovery — Configs are automatically discovered via Fabric entrypoints and registered at startup
  • JSON persistence — Config values are saved/loaded as pretty-printed JSON via Gson
  • Typed optionsBooleanOption, StringOption, IntegerOption, DoubleOption, EnumOption<E>, ListStringOption
  • Bounded rangesIntegerOption and DoubleOption enforce min/max bounds
  • List supportListStringOption backed by a mutable ListString wrapper with add, edit, remove, clear

Usage

1. Create a config class

import io.github.thesmoothrere.relib.config.ListString;
import io.github.thesmoothrere.relib.config.option.*;

@Config(name = "my_mod")
public class MyModConfig implements ConfigApi {

    private final BooleanOption enabled = new BooleanOption("enabled", true);
    private final IntegerOption volume = new IntegerOption("volume", 50, 0, 100);
    private final DoubleOption sensitivity = new DoubleOption("sensitivity", 0.5, 0.0, 1.0);
    private final StringOption greeting = new StringOption("greeting", "Hello!");
    private final EnumOption<MyEnum> mode = new EnumOption<>("mode", MyEnum.NORMAL);
    private final ListStringOption favoriteColors = new ListStringOption("favorite_colors", "red", "blue");

    public ConfigOption<Boolean> enabled() {
        return enabled;
    }

    public ConfigOption<Integer> volume() {
        return volume;
    }

    public ConfigOption<Double> sensitivity() {
        return sensitivity;
    }

    public ConfigOption<String> greeting() {
        return greeting;
    }

    public ConfigOption<MyEnum> mode() {
        return mode;
    }

    public ConfigOption<ListString> favoriteColors() {
        return favoriteColors;
    }
}

2. Register the entrypoint in fabric.mod.json

{
  "entrypoints": {
    "relib": [
      "com.example.MyModConfig"
    ]
  }
}

3. Access your config anywhere

MyModConfig config = ConfigManager.get(MyModConfig.class);
boolean enabled = config.enabled().getValue();

ConfigManager.load(config);
ConfigManager.save(config);

Option Types

Class Value Type Bounded
BooleanOption Boolean No
StringOption String No
IntegerOption Integer Yes
DoubleOption Double Yes
EnumOption<E> E extends Enum<E> No
ListStringOption ListString No

License

Licensed under the GNU Lesser General Public License v2.1. See LICENSE.

Available Versions

ReLib 0.1.0+26.1release
MC 26.1, 26.1.1, 26.1.2fabric
June 26, 2026

How to Install ReLib 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.1.2).

3

Install Mod

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

Compatibility

Mod Loaders

fabric

Minecraft Versions

26.1.2, 26.1.1, 26.1

Server-side

Unsupported

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

ReLib 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.1.2). You can switch loaders with one click in the panel.

Is ReLib compatible with fabric?

ReLib officially supports fabric for Minecraft 26.1.2, 26.1.1, 26.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with ReLib – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if ReLib 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 ReLib with just one click on your server.

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

Details

License
GNU Lesser General Public License v2.1 only
Server-side
Unsupported

Supported Versions

26.1.226.1.126.1