🔖 元数据#

为支持 Bookshelf Manager 等工具的自动化操作,模块必须声明特定元数据。所有元数据均在 CI/CD 流程中验证(参见贡献验证页面)。


功能元数据#

功能元数据直接定义在每个 .json 文件中,如下所示:

{
  "__bookshelf__": {
    "feature": true,
    "deprecated": false,
    "documentation": "<DOCUMENTATION>",
    "authors": [
      "<AUTHOR1>"
    ],
    "contributors": [
      "<CONTRIBUTOR1>"
    ],
    "created": {
      "date": "<YYYY/MM/DD>",
      "minecraft_version": "<VERSION>"
    },
    "updated": {
      "date": "<YYYY/MM/DD>",
      "minecraft_version": "<VERSION>"
    }
  },
  ...
}

字段

描述

必需

feature

Indicates whether the file is the endpoint of a feature

deprecated

Indicates whether the feature has been deprecated

documentation

功能文档的链接

authors

功能作者列表(不可为空)

contributors

贡献者列表(如提供见解、修复或间接帮助的人员)

created

创建日期和 Minecraft 版本(用于历史记录)

updated

最近更新的日期和 Minecraft 版本


🧩 模块元数据#

模块元数据定义在 modules/<module>/module.json 中。示例如下:

{
  ...
  "meta": {
    "name": "<NAME>",
    "slug": "<SLUG>",
    "description": "<DESCRIPTION>",
    "documentation": "<DOCUMENTATION>",
    "tags": [
      "<TAG1>"
    ],
    "authors": [
      "<AUTHOR1>"
    ],
    "contributors": [
      "<CONTRIBUTOR1>"
    ],
    "dependencies": [
      "<MODULE1>"
    ],
    "weak_dependencies": [
      "<MODULE1>"
    ]
  }
}

字段

描述

必需

name

模块显示名称(如 Foo

slug

模块的 slug(用于发布到平台,如 bookshelf-foo

description

模块用途的描述

documentation

模块文档的链接

tags

用于分类或标识模块的标签列表,也用于生成捆绑包(如 defaultdev

否(但会触发警告)

authors

模块作者列表(补充功能中的作者),不可为空

contributors

贡献者列表(补充功能中的贡献者)

dependencies

模块运行必需的依赖模块(如 bs.hitbox

weak dependencies

增强功能但非必需的模块(如 bs.log


📜 清单#

清单整合了 Bookshelf 所有模块和功能的元数据,自动生成并可通过以下命令更新:

uv run update

生成的文件位于 meta/manifest.json