Setthings
一个选项管理器。
仍在开发中——许多功能正在规划中。
设置通过原版菜单进行管理,配置文件屏幕允许你保存和加载包含这些设置的配置文件。
功能
- 配置文件 - 保存一组选项值
- 可扩展性 - 附加组件可以添加新的可保存到配置文件的选项
目前支持的设置:
- 键位绑定(原版与模组)
- 视野 (Fov)
- 声音音量
- 渲染距离与模拟距离
- 切换蹲下与切换疾跑
- 灵敏度
随着模组的开发,将添加更多支持
使用方法
选项屏幕上会新增一个“Profiles”按钮。点击它将打开配置文件菜单。
计划中
- 在线分享配置文件 - 开发中
- 移植到其他版本 - 计划中
附加组件
要将此模组添加到你的依赖项中,请在 build.gradle 中添加以下内容:
repositories {
maven {
name "nexusrealmsReleases"
url "https://maven.riftrealms.de/releases"
}
}
dependencies {
modImplementation "de.nexusrealms:setthings:${setthings_version}:${minecraft_version}"
}
定义设置
一个设置由以下几个函数定义:
- 获取器 (Getter)
- 设置器 (Setter)
- 默认值 - 检查是否为默认值,以及默认值供应器
- 序列化器
- 反序列化器
Setting 类的静态方法允许你通过这些函数创建 Setting 定义,或使用像编解码器 (codecs) 这样的辅助对象来创建。
注册
在你的客户端模组初始化器中,使用你的 Identifier 和 Setting 定义调用 SettingRegistry.register()。
如果你有任何问题,请加入我们的 Discord 服务器,你可以 @Farpo 寻求帮助
Setthings
An option manager.
Still in development - many features are planned.
Settings are managed through the normal vanilla menus, and a profile screen lets you save and load profiles with these settings.
Features
- Profiles - save sets of option values
- Extensible - add-ons can add new options that can be saved to profiles
- Options added by extensions are preserved, even when the add-on is removed
Currently supported settings:
- Keybinds (vanilla and modded)
- Fov
- Sound Volumes
- Render and Simulation distance
- Toggle Crouch and Toggle Sprint
- Sensitivity
More will be added as the mod is developed
Usage
A Profiles button is added to the option screen. It opens the profile menu.
Planned
- Sharing Profiles online - in development
- Porting to other versions - planned
Add-ons
To add this mod to your dependencies, add the following to your build.gradle:
repositories {
maven {
name "nexusrealmsReleases"
url "https://maven.riftrealms.de/releases"
}
}
dependencies {
modImplementation "de.nexusrealms:setthings:${setthings_version}:${minecraft_version}"
}
Defining settings
A setting is defined by several function
- Its getter
- Its setter
- Its default values - a check whether it is default, and a default value supplier
- Its serializer
- Its deserializer
Static methods of the Setting class let you create Setting definitions from these functions, or by using helper objects like codecs.
Registration
In your client mod initializer, call SettingRegistry.register() with your Identifier and Setting definition.
Join our discord if you have any questions, you can ping me (@Farpo) for help
评论 0
登录后参与评分
还没有评论,来抢沙发吧