? Smootheez Config Lib (SCL)
一个旨在简化 Minecraft 模组开发的配置处理的实用工具模组。
主要为我自己的模组开发,但也公开供公众免费使用。
❓ SCL 是什么?
Smootheez Config Lib (SCL) 提供了一种更简单、更清晰的方式来管理 Minecraft 模组的配置。
它消除了样板代码,并为以下功能提供了简单的接口:
- ✅ 配置文件管理
- ?️ 自动生成配置界面
- ⚙️ 自动生成配置文件
?️ 游戏内预览
? 标准配置界面

? 带有描述的 Config 界面

?️ 在 OptionList 中编辑值

➕ 向 OptionList 添加值

❗ 确认界面

? 快速开始
?️ 步骤 1 – 添加仓库
在你的 build.gradle 中:
repositories {
maven {
url "https://jitpack.io"
}
}
? 步骤 2 – 添加依赖
使用 gradle.properties 中的版本:
dependencies {
modImplementation "com.github.smootheez:scl:${project.scl_version}"
}
或者直接指定版本:
dependencies {
modImplementation "com.github.smootheez:scl:[version]"
}
? 示例用法
? 步骤 1 – 创建配置类
@Config(name = "example_config", gui = true)
public class ExampleConfig {
public static final ConfigOption<Integer> INT_TEXT = ConfigOption.create("intText", 0, -5, 100);
public static final ConfigOption<Double> DOUBLE_TEXT = ConfigOption.create("doubleText", 0.0, 0.0, 2.0);
public static final ConfigOption<Integer> INT_SLIDER = ConfigOption.create("intSlider", 0, -5, 100).asSlider();
public static final ConfigOption<Double> DOUBLE_SLIDER = ConfigOption.create("doubleSlider", 0.0, 0.0, 2.0).asSlider();
public static final ConfigOption<Double> DOUBLE_SLIDER_PERCENTAGE = ConfigOption.create("doubleSliderPercentage", 0.0, 0.0, 2.0).asSliderPercentage();
public static final ConfigOption<Boolean> BOOLEAN = ConfigOption.create("boolean", false);
public static final ConfigOption<OptionList> LIST = ConfigOption.create("list", "example_value_1", "example_value_2", "example_value_3");
public static final ConfigOption<ExampleEnum> ENUM = ConfigOption.create("enum", ExampleEnum.EXAMPLE_VALUE_1);
}
? 步骤 2 – 注册配置
在你的 fabric.mod.json 中:
"entrypoints": {
// ...existing entrypoints
"scl": [
"dev.smootheez.scl.example.ExampleConfig"
]
}
✅ 就这样! SCL 将自动生成:
- 配置文件
- 配置界面(需要
ModMenu)
? 注意: 仅当满足以下条件时才会生成配置界面:
- 设置了
gui = true - 配置的
name与你的模组 ID 匹配
? 下载
? 问题追踪
发现了 Bug 或有功能建议?
在此提交问题:GitHub Issues
⚠️ 重要说明
- ✅ 兼容 Minecraft 1.20.1+
- ? 采用 MIT 许可证
☕ 支持我
如果你觉得这个项目有用并想支持我的工作,请考虑捐赠:
? Smootheez Config Lib (SCL)
A utility mod designed to simplify configuration handling for Minecraft modding.
Primarily developed for my own mods, but freely available for public use.
❓ What is SCL?
Smootheez Config Lib (SCL) provides an easier and cleaner way to manage configurations for Minecraft mods.
It removes boilerplate and offers a simple interface for:
- ✅ Config file management
- ?️ Automatic config screen generation
- ⚙️ Automatic config file generation
?️ In-Game Previews
? Standard Config Screen

? Config Screen with Descriptions

?️ Edit Value in OptionList

➕ Add Value to OptionList

❗ Confirmation Screen

? Getting Started
?️ Step 1 – Add Repository
In your build.gradle:
repositories {
maven {
url "https://jitpack.io"
}
}
? Step 2 – Add Dependency
Using version from gradle.properties:
dependencies {
modImplementation "com.github.smootheez:scl:${project.scl_version}"
}
Or use the version directly:
dependencies {
modImplementation "com.github.smootheez:scl:[version]"
}
? Example Usage
? Step 1 – Create a Config Class
@Config(name = "example_config", gui = true)
public class ExampleConfig {
public static final ConfigOption<Integer> INT_TEXT = ConfigOption.create("intText", 0, -5, 100);
public static final ConfigOption<Double> DOUBLE_TEXT = ConfigOption.create("doubleText", 0.0, 0.0, 2.0);
public static final ConfigOption<Integer> INT_SLIDER = ConfigOption.create("intSlider", 0, -5, 100).asSlider();
public static final ConfigOption<Double> DOUBLE_SLIDER = ConfigOption.create("doubleSlider", 0.0, 0.0, 2.0).asSlider();
public static final ConfigOption<Double> DOUBLE_SLIDER_PERCENTAGE = ConfigOption.create("doubleSliderPercentage", 0.0, 0.0, 2.0).asSliderPercentage();
public static final ConfigOption<Boolean> BOOLEAN = ConfigOption.create("boolean", false);
public static final ConfigOption<OptionList> LIST = ConfigOption.create("list", "example_value_1", "example_value_2", "example_value_3");
public static final ConfigOption<ExampleEnum> ENUM = ConfigOption.create("enum", ExampleEnum.EXAMPLE_VALUE_1);
}
? Step 2 – Register the Config
In your fabric.mod.json:
"entrypoints": {
// ...existing entrypoints
"scl": [
"dev.smootheez.scl.example.ExampleConfig"
]
}
✅ That's it! SCL will automatically generate:
- The config file
- The config screen (requires
ModMenu)
? Note: The config screen will only be generated if:
gui = trueis set- The config
namematches your mod ID
? Download
? Issue Tracker
Found a bug or have a feature suggestion?
Submit an issue here: GitHub Issues
⚠️ Important Notes
- ✅ Compatible with Minecraft 1.20.1+
- ? Licensed under the MIT License
☕ Support Me
If you find this project helpful and want to support my work, consider donating:
下载 Smootheez Config Lib
下载 Smootheez Config Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smootheez Config Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smootheez Config Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smootheez Config Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smootheez Config Lib
下载 Smootheez Config Lib
下载 Smootheez Config Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smootheez Config Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smootheez Config Lib
- 崩溃修复
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧