1. Wiki
  2. /Entities
  3. /minecraft:spawn_egg_interaction

minecraft:spawn_egg_interaction

Don't want to write this by hand? GodCraft sets minecraft:spawn_egg_interaction for you with a switch.Get GodCraft

Overview

minecraft:spawn_egg_interaction is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets players use this mob's own spawn egg on it to spawn a baby. The baby gets the entity_born event plus any on_spawn event you set.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

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

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