1. Wiki
  2. /实体
  3. /minecraft:variant

minecraft:variant

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:variant。Get GodCraft

概览

minecraft:variant 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 存储一个变种编号,过滤器和资源包可以读取它来区分同一生物的不同版本,比如猫的不同毛色。

字段

字段类型默认值说明
valueInteger"0"变种编号;0 通常是基础版本。

示例

写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):

BP/entities/<name>.json
{
  "minecraft:variant": {
    "value": "0"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more