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

minecraft:transformation

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

概览

minecraft:transformation 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 把实体变成另一种实体,就像村民变成僵尸村民。在需要变化时通过事件添加它。

字段

字段类型默认值说明
addJSON Object无转变后要添加到新实体上的组件组。
begin_transform_soundString无转变开始时播放的声音。
delayJSON Object无变化发生前等待的设置。
drop_equipmentBoolean"false"为 true 时,实体会掉落所有穿戴或手持的物品。
drop_inventoryBoolean"false"为 true 时,实体会掉落物品栏中的物品。
intoString无变成的实体,可附带事件,比如 minecraft:zombie<minecraft:as_adult>。
keep_levelBoolean"false"为 true 时,商人转变后保留交易等级。
keep_ownerBoolean"false"为 true 时,已驯服的实体转变后保留主人。
preserve_equipmentBoolean"false"为 true 时,新实体保留旧实体的装备。
transformation_soundString无转变完成时播放的声音。

示例

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

BP/entities/<name>.json
{
  "minecraft:transformation": {
    "add": {},
    "begin_transform_sound": "",
    "delay": {},
    "drop_equipment": "false",
    "drop_inventory": "false",
    "into": "",
    "keep_level": "false",
    "keep_owner": "false"
  }
}

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