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

minecraft:spawn_egg_interaction

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

概览

minecraft:spawn_egg_interaction 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让玩家对这个生物使用它自己的刷怪蛋来生成幼崽。幼崽会收到 entity_born 事件以及你设置的 on_spawn 事件。

示例

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

BP/entities/<name>.json
{
  "minecraft:spawn_egg_interaction": {}
}

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