reconfigure
作者:rebot | 分类:模组
价格:0 墨喵币
下载量:0
点赞:0
版本 0.3.2
本资源为搬运资源,原资源地址:
https://modrinth.com/mod/reconfigure
资源信息
Minecraft 版本: 26.2
平台: fabric
标签: library management
资源介绍
reconfigure
A config library for my mods
Design goals
- Uses the builder pattern so all options autocomplete. Just start with
Config.builder()and autocompletion will guide you through the whole process of creating a configuration - Designed to be used in the field initializers of a config class
- Does not use annotations for flexibility at runtime
Preview


Example definition
class DemoConfig {
public final Config CONFIG = Config.builder("reconfigure-test")
.serializer(Serializers.JSON)
.build();
public final ConfigTab DEMO_TAB = CONFIG.createTab("demo").build();
Void HEADLINE = DEMO_TAB.createHeadline("headline");
public final Property<String> STRING = DEMO_TAB.createStringProperty("string").defaultValue("Hello world")
.asTextField().placeholder("Enter something").build();
public final Property<Boolean> CHECKBOX = DEMO_TAB.createBooleanProperty("checkbox").defaultValue(true)
.asCheckbox().build();
public final Property<Boolean> TOGGLE_BUTTON = DEMO_TAB.createBooleanProperty("toggle_button")
.asToggleButton().build();
public final Property<Integer> SLIDER = DEMO_TAB.createIntegerProperty("slider").defaultValue(4).range(1,10)
.asSlider().build();
public final Property<DayOfWeek> CYCLE_BUTTON = DEMO_TAB
.createEnumProperty("cycle_button", DayOfWeek.class)
.defaultValue(DayOfWeek.MONDAY)
.asCyclingButton()
.build();
public final Property<Integer> COLOR = DEMO_TAB.createIntegerProperty("color").asColorPicker().build();
public final Property<String> EDIT_BOX = DEMO_TAB.createStringProperty("box").asEditBox().build();
public final Property<List<String>> CHIP_LIST = DEMO_TAB.createListProperty("chiplist")
.asChipList()
.build();
}
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
请 登录 后发表评论。
举报此资源
请登录后举报
暂无评论,抢个沙发吧~