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

minecraft:spawn_on_death

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

Overview

minecraft:spawn_on_death is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Spawns new entities when this one dies, for example a slime splitting into smaller slimes.

Fields

FieldTypeDefaultDescription
entity_to_spawnstring"self"Entity to spawn; leave it out to spawn more of this same entity.
spawn_methodstring"spawned"How the new entities are created: born, spawned or summoned.
spawn_amountinteger1How many entities to spawn.
inherit_parent_namebooleantrueIf true, the new entities keep the custom name of the one that died.
additional_spawn_rangeIntRange{"max":0,"min":0}A random extra number of entities added on top of the spawn amount.
filtersFilter Group{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Conditions that must be true for anything to spawn.

Example

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

BP/entities/<name>.json
{
  "minecraft:spawn_on_death": {
    "entity_to_spawn": "self",
    "spawn_method": "spawned",
    "spawn_amount": 1,
    "inherit_parent_name": true,
    "additional_spawn_range": {
      "max": 0,
      "min": 0
    },
    "filters": {
      "AND": null,
      "NOT": null,
      "OR": null,
      "all": null,
      "all_of": null,
      "any": null,
      "any_of": null,
      "none_of": null
    }
  }
}

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