
Что это
General-purpose Minecraft mod library, also powering Rere's mods
- Тип: мод
- Загрузчик: fabric
- Версии Minecraft: 26.1 – 26.3
- Скачиваний на Modrinth: 821
Подробно
General-purpose utility library for Fabric mods, originally built for TheSmoothRere's mods but open for anyone to use.
- 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 options — BooleanOption, StringOption, IntegerOption, DoubleOption, EnumOption , ListStringOption - Bounded ranges — IntegerOption and DoubleOption enforce min/max bounds - List support — ListStringOption backed by a mutable ListString wrapper with add, edit, remove, clear
java import io.github.thesmoothrere.relib.config.ListString; import io.github.thesmoothrere.relib.config.option.;
@Config(name = "mymod") 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 mode = new EnumOption<>("mode", MyEnum.NORMAL); private final ListStringOption favoriteColors = new ListStringOption("favoritecolors", "red", "blue");
public ConfigOption enabled() { return enabled; }
public ConfigOption volume() { return volume; }
public ConfigOption sensitivity() { return sensitivity; }
public ConfigOption greeting() { return greeting; }
public ConfigOption mode() { return mode; }
public ConfigOption favoriteColors() { return favoriteColors; } }
2. Register the entrypoint in fabric.mod.json
json { "entrypoints": { "relib": [ "com.example.MyModConfig" ] } }
java MyModConfig config = ConfigManager.get(MyModConfig.class); boolean enabled = config.enabled().getValue();
ConfigManager.load(config); ConfigManager.save(config);
| Class | Value Type | Bounded | |-------|-----------|---------| | BooleanOption | Boolean | No | | StringOption | String | No | | IntegerOption | Integer | Yes | | DoubleOption | Double | Yes | | EnumOption | E extends Enum | No | | ListStringOption | ListString | No |
Licensed under the GNU Lesser General Public License v2.1. See LICENSE.
Как установить
Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.
Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.
Комментарии 0
Комментарии к этому материалу отключены.
Читайте также
Mace Music
Plays Chaos Construct by AZALI or songs that the user imports, plays if the user is holding a mace. 05.12.2026
Better Programmer Glass
Makes the old glass and stained glass texture cleaner while keeping the older style. For use with programmer art style resourcepacks 05.12.2026
Climbable Chains
Lets you climb chain blocks across multiple versions! 05.12.2026
Sulfur Cave Labyrinth
An underground puzzle structure for Sulfur Caves 05.12.2026
Piekarnia Modpack
A balanced survival-focused modpack that adds depth and immersion without the overwhelm of kitchen-sink packs. Perfect for players who want… 05.12.2026
Mad Pixels 16x
The 16x version of Mad Pixels. Make your Minecraft world simpler and more cheerful with the Mad Pixels resource pack! 05.12.2026