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

minecraft:peek

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

概览

minecraft:peek 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让实体可以探出和缩回,就像潜影贝打开外壳一样,并在每个阶段运行事件。

字段

字段类型默认值说明
on_closeString无实体停止探出并合上时运行的事件。
on_openString无实体开始探出时运行的事件。
on_target_openString无实体的目标开始探出时运行的事件。

示例

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

BP/entities/<name>.json
{
  "minecraft:peek": {
    "on_close": "",
    "on_open": "",
    "on_target_open": ""
  }
}

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