
Vanilla Options API
Allow mods to use vanilla's systems to add custom options
Оцените первым
121
0
Library that easily allows mod developers to create custom options using vanilla's systems, and add options to vanilla's option screens.
Code example:
public class MyMod implements ClientModInitializer {
private static final OptionInstance<Boolean> OPTION = ...;
public static OptionInstance<Boolean> option() {
return OPTION;
}
@Override
public void onInitializeClient() {
Identifier optionId = Identifier.fromNamespaceAndPath("modid", "custom_option");
VanillaOptionsAPI.register(optionId, OptionsMenuLocation.ACCESSIBILITY, MyMod::option);
}
}
The following would add a boolean option that saves to options.txt as modid.custom_option, appearing in the accessibilty options menu.
Часто задаваемые вопросы
Совместимость
Зависимости
Ссылки
Создатели
Детали
Лицензия:
Опубликован:3 месяца назад
Обновлён:2 недели назад
