护甲组合API

护甲组合API

一套用于匹配全套盔甲的API

此模组可通过自定义 ID 实现完整的盔甲套装识别,并允许特定能力要求装备特定盔甲套装。

最初是为 Shadow Mist 模组配置专属盔甲套装而创建,如今该 API 已向其他模组制作者和整合包开发者公开可用。

配置的装备从 config/armors_api/<id>.json 配置文件中读取。

JSON 示例:

{
  "id": "shadow_armors",
  "armors_list": {
    "helmet": [
      "shadowlands:enhanced_shadowmetal_helmet"
    ],
    "chestplate": [
      "shadowlands:enhanced_shadowmetal_chestplate"
    ],
    "leggings": [
      "shadowlands:enhanced_shadowmetal_leggings"
    ],
    "boots": [
      "shadowlands:enhanced_shadowmetal_boots"
    ]
  }
}

命令:

  • /armors_api add <id> all – 将所有当前装备的盔甲部件添加到指定套装中。
  • /armors_api add <id> <helmet|chestplate|leggings|boots> – 将当前装备的 <helmet|chestplate|leggings|boots> 添加到指定套装中。
  • /armors_api reload – 重新加载配置文件。
  • /armors_api list – 列出所有已注册的盔甲套装。
  • /armors_api check <id> – 检查玩家当前是否穿戴了指定的盔甲套装。
  • /armors_api remove all – 移除所有已注册的盔甲套装。
  • /armors_api remove <id> – 移除指定 ID 的盔甲套装数据(支持移除 all 或单个槽位:<helmet|chestplate|leggings|boots>)。

该模组提供了开发者 API,并支持 KubeJS 集成。