Mod Sets
本项目深受 ThatOrThis 的启发。 该模组用于 Minecraft Fabric/Quilt/Forge,以管理游戏内的模组加载。 对于整合包开发者来说非常有用。
功能
- 在定义好的模组集(Mod Set)/子目录名称/模组 ID 中启用/禁用模组(需要重启)
- 使用 进行配置界面显示
- 为整合包开发者提供自定义模组加载规则,使整合包拥有更多用户可定义的选项
使用方法
规则文件应为位于 config/modsets/rules 下的 JSON 格式文件。
通过 Mod Menu 添加规则并进入配置界面。
完整示例:
Mod Set
Mod Set 是在 config/modsets/modsets.json 中定义的条目,它是字符串到模组 ID 集合映射的集合。
具体来说,mods 文件夹中的子文件夹名称将成为模组集,其中的模组属于该集。而仅包含自身的模组 ID 也将被视为一个模组集。
注意:由配置定义的模组集会覆盖具有相同名称的文件夹或模组 ID。
示例:
{
// `sodium` 将指向这里的两个模组。
// 如果禁用此模组集,列表中存在的模组将不会加载
"sodium": {
"text": "Sodium",
"description": "性能提升:+++++",
"mods": [
"sodium",
"indium"
]
}
}
Rule
每条规则都包含用于显示所需信息的文本和描述。
以及用于 YACL 用户界面的控制器。
示例:
{
"text": {
"text": "我的第一个规则集",
"bold": true,
"color": "green"
},
"description": "Awwww",
"rules": [
{
"text": "text",
"description": "description",
"controller": {
"type": "type" // 注意,这不是有效的控制器类型。请从下方的控制器中选择类型
}
}
]
}
Controllers
Label
用于在屏幕上显示文本 示例:
{
"text": "标签文本",
"description": "文本 文本",
"controller": {
"type": "label"
}
}
Boolean
用于开启/关闭单个模组集 示例:
{
"text": "布尔开关",
"description": "文本 文本",
"controller": {
"type": "boolean",
"id": "sodium"
}
}
Cycling
用于在列表中的模组集之间切换。 当存在冲突的模组(如 sodium 和 optifabric)时非常有用,或者用于切换难以处理的整合包内容。 示例:
{
"text": "循环切换",
"description": "文本 文本",
"controller": {
"type": "cycling",
"ids": [
// 不要留空
"sodium",
"optifabric"
]
}
}
Mods Group
为模组集中的每个模组分配一个简单的布尔控制器选项。 示例:
{
"text": "模组组",
"description": "文本 文本",
"controller": {
"type": "mods_group",
// 默认为 true
"collapsed": false,
"ids": [
// 不要留空
"sodium",
"optifabric"
]
}
}
Rules Group
将规则分组,以便能够折叠规则。 示例:
{
"text": "规则组",
"description": "文本 文本",
"controller": {
"type": "rules_group",
// 默认为 true
"collapsed": true,
"rules": [ // 不要留空
{
"text": "text",
"description": "description",
"controller": {
"type": "label"
}
},
{
"text": "text",
"description": "description",
"controller": {
"type": "boolean",
"id": "sodium"
}
}
]
}
}
注意:所有的 text 和 description 都是原始 JSON 格式的文本。 使用 来生成文本。
Mod Sets
This project heavily inspired by ThatOrThis The mod is using for Minecraft Fabric/Quilt/Forge for managing mod loading in game. And useful for modpack developer
Feature
- Enable/Disable mods in game with defined mod sets/subdirectory name/mod id(Need restart)
- Using for config screen
- Custom mod loading rules for modpack developer to make the pack with more user defined options
Usage
The rules files should be json in config/modsets/rules.
Add rule and enter the config screen through Mod Menu
Full example:
Mod Set
Mod set is entry defined in config/modsets/modsets.json that is string to set of mod id map.
Specifically, sub folder name in mods folder will be mod sets the mods in it. And mod id will be the mod set only
contains itself.
Notice, the defined mod sets by config will override the folder/mod id with the same name.
Example:
{
// 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"
]
}
}
Rule
Every rule hold a text and description for displaying the info you want.
And a controller for YACL user interface
Example:
{
"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
}
}
]
}
Controllers
Label
For displaying text on screen Example:
{
"text": "The label",
"description": "Text Text",
"controller": {
"type": "label"
}
}
Boolean
For switching a single mod set on/off Example:
{
"text": "The boolean",
"description": "Text Text",
"controller": {
"type": "boolean",
"id": "sodium"
}
}
Cycling
For switching between mod sets in a list. Useful when there is conflicting mods such as sodium and optifabric. Or switching the pack difficult Example:
{
"text": "The cycling",
"description": "Text Text",
"controller": {
"type": "cycling",
"ids": [
// Don't empty
"sodium",
"optifabric"
]
}
}
Mods Group
Assign a simple boolean controller option to every mods in the mod sets. Example:
{
"text": "The mods group",
"description": "Text Text",
"controller": {
"type": "mods_group",
// Default is true
"collapsed": false,
"ids": [
// Don't empty
"sodium",
"optifabric"
]
}
}
Rules Group
Group the rules so that it's able to collapse the rules Example:
{
"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"
}
}
]
}
}
Notice: Every text and description is text raw json. Using for generating text.
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Mod Sets
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
:bug: 错误修复
59cac30- 因connector.additionalModLocations配置错误,导致无法加载子目录中的 Fabric 模组 (由 @SettingDust 提交)
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧