Главная › Моды › Библиотеки › SuperMartijn642's Config Lib

SuperMartijn642's Config Lib
Config Lib makes dealing with config files just a bit easier.
SuperMartijn642's Config Lib — мод для Minecraft 1.16.5–26.3 из категории «Библиотеки» для загрузчиков Fabric, Forge, NeoForge, Quilt. Автор: SuperMartijn642. В Lorix можно добавить мод в сборку — нужные зависимости подтянутся автоматически — и скачать её одним ZIP с папкой mods/ или запустить в Lorix Launcher одной кнопкой.
- Категория
- Библиотеки
- Загрузчики
- Fabric, Forge, NeoForge, Quilt
- Версии Minecraft
- 26.3, 26.2, 26.1.2, 26.1.1, 26.1, 1.21.11, 1.21.10, 1.21.9, 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5
- Скачиваний на Modrinth
- 34 830 725
Зависимости
Описание
SuperMartijn642's Config Lib allows you to specify a config once and it then handles reloading values between world loads, syncing values with clients, and generating values for client- or server-only on its own.
Creating a config:
A config is created using a ModConfigBuilder.
Simply create a new instance using #ModConfigBuilder().
A value can be added to the config with ModConfigBuilder#define which takes a name and a default value.
For integer and double values a minimum and maximum value are also required.
ModConfigBuilder#define returns a Supplier which should be stored to retrieve the value from the config.
A comment can be added to a value by calling ModConfigBuilder#comment(String) before defining the value.
By default values are reloaded when world is loaded.
This can be changed to only reload a value when Minecraft launches by calling ModConfigBuilder#gameRestart() before defining the value.
Values in COMMON or SERVER configs are synchronized with clients by default, to prevent this use ModConfigBuilder#dontSync().
Values can also be put into categories.
ModConfigBuilder#push(String) pushes a category and ModConfigBuilder#pop() pops a category.
A comment can be added to the active category using ModConfigBuilder#categoryComment(String).
After defining all values ModConfigBuilder#build() must be called to finish the config.
Now the values in your config will reloaded and synced automatically and the values can be retrieved using the stored Supplier instances.
This will work for all available versions, that includes Minecraft 1.12, 1.14, 1.15, 1.16, 1.17, 1.18, and 1.19.
Как установить SuperMartijn642's Config Lib
- Скачайте Lorix Launcher и создайте сборку с нужной версией и загрузчиком.
- Найдите SuperMartijn642's Config Lib в окне модов — зависимости добавятся сами.
- Нажмите «Играть».
Или соберите модпак в конструкторе и скачайте ZIP: папку mods/ из архива положите в .minecraft.