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

minecraft:spawn_entity

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

Overview

minecraft:spawn_entity is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the entity drop an item or spawn another entity every so often, like a chicken laying eggs.

Fields

FieldTypeDefaultDescription
filtersMinecraft FilternoneConditions that must be true for anything to spawn.
max_wait_timeInteger"600"Longest wait in seconds before the next spawn.
min_wait_timeInteger"300"Shortest wait in seconds before the next spawn.
num_to_spawnInteger"1"How many entities appear each time.
should_leashBoolean"false"If true, the new entity is leashed to this one.
single_useBoolean"false"If true, it only spawns once and never again.
spawn_entityStringnoneEntity to spawn; leave it empty to drop spawn_item instead.
spawn_eventString"minecraft:entity_born"Event to run on the newly spawned entity.
spawn_itemString"egg"Item to drop, such as minecraft:egg.
spawn_item_eventTriggernoneEvent to run on this entity when the item drops.
spawn_methodString"born"How the new entity is created, such as born or spawned.
spawn_soundString"plop"Sound played when something spawns.

Example

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

BP/entities/<name>.json
{
  "minecraft:spawn_entity": {
    "filters": {},
    "max_wait_time": "600",
    "min_wait_time": "300",
    "num_to_spawn": "1",
    "should_leash": "false",
    "single_use": "false",
    "spawn_entity": "",
    "spawn_event": "minecraft:entity_born"
  }
}

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