SettingsManagerLib

A simple, easy-to-set-up config library using YACL and Mod Menu to create simple or complex config menus

Редакция NLZONE · 2 мин чтения · 1 просмотр
SettingsManagerLib
Скачать SettingsManagerLib1.21.10 – 26.3 · с официальной страницы: modrinth.com
Перейти к загрузке

Что это

A simple, easy-to-set-up config library using YACL and Mod Menu to create simple or complex config menus

  • Тип: мод
  • Загрузчик: fabric
  • Версии Minecraft: 1.21.10 – 26.3
  • Скачиваний на Modrinth: 106 041

Подробно

A simple settings manager library, which implements YACL to easily generate config screens for Mod Menu.

If you would like to use this mod to generate config menus for your own mod, I recommend contacting me, as I may not keep this page updated as the mod updates.

NOTE: This mod does nothing by itself. It is a library for other mods.

Features: - Easy and quick setup - Easy implementation - Easy access to settings - Built-in config file generation to save settings between client restarts - Built-in chroma manager to sync chroma features across files - Supports nearly all YACL fields

Setup: Add the mod as a dependency: in build.gradle groovy repositories { maven { url = "https://api.modrinth.com/maven" } maven { name = "Terraformers" url = "https://maven.terraformersmc.com/"} maven { name 'Xander Maven' url 'https://maven.isxander.dev/releases'} }

dependencies { modImplementation("maven.modrinth:settingsmanagerlib:${project.modmenuversion}") modImplementation("com.terraformersmc:modmenu:${project.modmenuversion}") modImplementation "dev.isxander:yet-another-config-lib:${project.yaclversion}" }

in gradle.properties properties settingsmanagerlibversion=LATESTVERSIONNUMBER (e.g. 1.0.0+1.21.11) modmenuversion=LATESTVERSIONNUMBER (e.g. 15.0.0) yaclversion=LATESTVERSIONNUMBER (e.g. 3.7.1+1.21.6-fabric)

in fabric.mod.json json "entrypoints": { "modmenu": [ "com.example.mod.ModMenuAPI" ] }

Then create a new class ModMenuAPI java public class ModMenuAPI implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { return parentScreen -> ExampleModClient.settings.getConfig(parentScreen); } }

Set up the mod: in ExampleModClient java public static Settings settings;

@Override public void onInitializeClient() { settings = new Settings().setup("Example Mod", "examplemod"); settings.loadFromFile(); }

To add a setting: Note: supports Strings, Booleans, Integers, Floats, Colors, and custom Enums.

in ExampleModClient java @Override public void onInitializeClient() { settings.add(String settingId, String page, String group, String/int/float defaultValue, String settingName, String description)

settings.add("guiName", "Visual Settings", "Overlay", "Default Gui Name", "Gui Scale", "This text will appear as a tooltip when you click on the option."); }

in ExampleModClient java @Override public void onInitializeClient() { settings.addSlider(String settingId, String page, String group, int/fl

Как установить

Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.

Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.

Редакция NLZONE

Пишем о серверах, модах и играх, в которые играем сами. Нашли ошибку — напишите нам, исправим.

Комментарии 0

Комментарии к этому материалу отключены.

Читайте также