自定义模型数据查看器

自定义模型数据查看器

列出所有具有自定义模型数据的物品

装饰

CustomModelDataViewer 是一个轻量级模组,为所有使用 1.21.4+ 新 CustomModelDataComponent 的物品添加了一个专用的创造模式标签页。它能自动检测任何引用 customModelData 字符串(如示例 .json 片段中所示)的物品,并将其整理到一个便捷的位置。这使得资源包创建者和模组开发者能够更轻松地快速查看、测试和管理自定义物品模型,无需在标准标签页或多个文件中查找。

示例物品:

assets/minecraft/items/brown_dye.json

{
    "model": {
      "type": "minecraft:select",
      "property": "minecraft:custom_model_data",
      "cases": [
        {
            "when": "old_hat",
            "model": {
              "type": "minecraft:model",
              "model": "skyrealm:item/hats/old_hat",
              "tints": [
                {
                  "type": "minecraft:custom_model_data",
                  "default": 15702017
                }
              ]
            }
          }
      ],
      "fallback": {
        "type": "minecraft:model",
        "model": "minecraft:item/brown_dye"
      }
    }
}