跳到正文

Mod Sets

作者:settingdust

通过图形界面控制模组加载。适用于整合包和需要可选功能的服务器,也适合想要免去文件操作、直接管理模组的玩家。

收藏

截图

介绍

介绍由机器翻译自 Modrinth 原页面,仅供参考。

模组集

Modrinth Downloads Modrinth Version Modrinth Game Versions

GitHub GitHub issues
Discord

本项目深受 ThatOrThis
启发
此模组适用于 Minecraft Fabric/Quilt/Forge,可在游戏中管理模组加载。
也适用于整合包开发者

功能

  • 通过已定义的模组集/子目录名称/模组 ID,在游戏中启用或禁用模组(需要重启)
  • 使用 https://github.com/isXander/YetAnotherConfigLib 提供配置界面
  • 为整合包开发者提供自定义模组加载规则,以便整合包拥有更多由用户定义的选项

用法

规则文件应为 JSON 格式,并放在 config/modsets/rules 中。
添加规则,并通过 Mod Menu 打开配置界面
完整示例:https://github.com/SettingDust/ModSets/blob/main/example_rules.json

模组集

模组集是在 config/modsets/modsets.json 中定义的条目,它是一个字符串到模组 ID 集合的映射。
具体来说,mods 文件夹中的子文件夹名称会成为模组集,该文件夹中的模组也属于此模组集。
模组 ID 本身也会成为一个仅包含自身的模组集。
请注意,通过配置定义的模组集会覆盖同名的文件夹/模组 ID。
示例:

{
    // The `sodium` will target the two mods here.
  // If disable this mod set, the mod in list won't load if it is exist
  "sodium": {
    "text": "Sodium",
    "description": "Performance: +++++",
    "mods": [
      "sodium",
      "indium"
    ]
  }
}

规则

img_1.png
每条规则都包含用于显示所需信息的文本和描述。
还包含一个用于 YACL 用户界面的控制器
示例:

{
  "text": {
    "text": "My first rule set",
    "bold": true,
    "color": "green"
  },
  "description": "Awwww",
  "rules": [
    {
      "text": "text",
      "description": "description",
      "controller": {
        "type": "type" // Notice, this isn't valid type of controller. Take the type from controllers below
      }
    }
  ]
}

控制器

标签

用于在屏幕上显示文本
示例:

{
  "text": "The label",
  "description": "Text Text",
  "controller": {
    "type": "label"
  }
}

布尔值

用于启用或禁用单个模组集
示例:

{
  "text": "The boolean",
  "description": "Text Text",
  "controller": {
    "type": "boolean",
      "id": "sodium"
  }
}

循环选择

用于在列表中的模组集之间切换。
适用于钠和 OptiFabric 等存在冲突的模组,或用于切换较难切换的整合包
示例:

{
  "text": "The cycling",
  "description": "Text Text",
  "controller": {
    "type": "cycling",
      "ids": [
          // Don't empty
      "sodium",
      "optifabric"
    ]
  }
}

模组组

为模组集中的每个模组分配一个简单的布尔值控制选项。
示例:

{
  "text": "The mods group",
  "description": "Text Text",
  "controller": {
    "type": "mods_group",
    // Default is true
    "collapsed": false,
      "ids": [
          // Don't empty
      "sodium",
      "optifabric"
    ]
  }
}

规则组

将规则分组,以便折叠显示
示例:

{
  "text": "The rules group",
  "description": "Text Text",
  "controller": {
    "type": "rules_group",
    // Default is true
    "collapsed": true,
    "rules": [ // Don't empty
      {
        "text": "text",
        "description": "description",
        "controller": {
          "type": "label"
        }
      },
      {
        "text": "text",
        "description": "description",
        "controller": {
          "type": "boolean",
            "id": "sodium"
        }
      }
    ]
  }
}

注意:所有文本和描述都是原始 JSON 文本。
使用 https://www.minecraftjson.com/ 生成文本。

常见问题

Mod Sets 支持哪些 Minecraft 版本?

Mod Sets 支持 Minecraft Java 版 1.19.2–1.21.11,共 21 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Mod Sets 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。

评论

登录后评论和评分

settingdust 的其他作品

查看全部 →