McLists一周年快乐
服务器已经添加了详细介绍信息板块
服主可以在管理后台来提交自己服务器介绍信息。
服务器介绍信息提交后,管理人员会进行审核
审核通过后会在服务器详细页面进行显示
提交服务器介绍信息会让新玩家更好的了解你的服务器哦~
添加图片信息,也会让百度等搜索引擎更好的收录您的服务器哦~
管理平台地址:传送门
Smootheez Config Lib

Smootheez Config Lib - Smootheez 配置库

适用于我所有模组的配置库模组
fabric 作者 Smootheez 支持版本 1.20.1 - 1.21.8
下载量
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 匹配

📥 下载


🐞 问题追踪

发现错误或有功能建议?

在此提交问题:GitHub Issues


⚠️ 重要说明

  • ✅ 兼容 Minecraft 1.20.1+
  • 📜 基于 MIT 许可证 授权

☕ 支持我

如果你觉得这个项目有帮助并想支持我的工作,可以考虑捐赠:

ko-fi
paypal
基本信息
模组名称Smootheez Config Lib
作者Smootheez
下载量48,496
关注数21
支持版本1.20.1 - 1.21.8
加载器fabric
客户端required
服务端unsupported

友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作

历史访问人数:76,783  |  历史访问人次:164,949

今日访问人数:7,410  |  今日访问人次:8,112

昨日访问人数:20,761  |  昨日访问人次:24,774

Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.

Powered by GermMC 京ICP备17023959号-6