下载量
48,496
关注数
21
数据来源
Modrinth
模组详细介绍
📦 Smootheez 配置库 (SCL)
一款旨在简化 Minecraft 模组配置处理的实用模组。
主要为我的个人模组开发,但也免费供公众使用。
❓ 什么是 SCL?
Smootheez 配置库 (SCL) 为 Minecraft 模组提供了一种更简单、更清晰的方式来管理配置。
它移除了样板代码,并提供了一个简单的接口用于:
- ✅ 配置文件管理
- 🛠️ 自动配置界面生成
- ⚙️ 自动配置文件生成
🖼️ 游戏内预览
🔧 标准配置界面

📝 带描述的配置界面

🗂️ 在 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 INT_TEXT = ConfigOption.create("intText", 0, -5, 100);
public static final ConfigOption DOUBLE_TEXT = ConfigOption.create("doubleText", 0.0, 0.0, 2.0);
public static final ConfigOption INT_SLIDER = ConfigOption.create("intSlider", 0, -5, 100).asSlider();
public static final ConfigOption DOUBLE_SLIDER = ConfigOption.create("doubleSlider", 0.0, 0.0, 2.0).asSlider();
public static final ConfigOption DOUBLE_SLIDER_PERCENTAGE = ConfigOption.create("doubleSliderPercentage", 0.0, 0.0, 2.0).asSliderPercentage();
public static final ConfigOption BOOLEAN = ConfigOption.create("boolean", false);
public static final ConfigOption LIST = ConfigOption.create("list", "example_value_1", "example_value_2", "example_value_3");
public static final ConfigOption ENUM = ConfigOption.create("enum", ExampleEnum.EXAMPLE_VALUE_1);
}
🧩 步骤 2 – 注册配置
在你的 fabric.mod.json 中:
"entrypoints": {
// ...现有入口点
"scl": [
"dev.smootheez.scl.example.ExampleConfig"
]
}
✅ 完成!
SCL 将自动生成:
- 配置文件
- 配置界面(需要
ModMenu)
📌 注意:
配置界面仅在以下情况下生成:
- 设置了
gui = true - 配置的
name与你的模组 ID 匹配
📥 下载
- 🔗 Modrinth
- 🔗 CurseForge
- 📦 JitPack 发布页
🐞 问题追踪
发现错误或有功能建议?
在此提交问题:GitHub Issues
⚠️ 重要说明
- ✅ 兼容 Minecraft 1.20.1+
- 📜 基于 MIT 许可证 授权
☕ 支持我
如果你觉得这个项目有帮助并想支持我的工作,可以考虑捐赠:
基本信息
模组名称Smootheez Config Lib
作者Smootheez
下载量48,496
关注数21
支持版本1.20.1 - 1.21.8
加载器fabric
客户端required
服务端unsupported