Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Routine: Spawn Entity

Deide edited this page Oct 10, 2012 · 5 revisions

Spawns a creature with the health specified by the returned integer, at the specified entity's location. "Stated" mobs (i.e., Creeper_Charged, Wolf_Angry, Slime_Medium) are also spawnable. The entity being spawned can be referenced inside the routine as "spawned".

Syntax

- '{entity}effect.spawn.{spawnable_entity}':
    - 'routines here'

Examples

Death: #Zombie kills yield more zombies. 
    - 'if attacker.type.Zombie and target.type.Human':
        - 'targeteffect.spawn.Zombie': 'spawned_maxhealth'
Spawn:
    - 'if world.environment.THE_END and entity.type.enderman':
        - '0' # cancel the enderman's spawn
        - 'entityeffect.spawn.zombiepigman': # and spawn a Zombie Pigman instead
            - 'spawned_maxhealth'
Clone this wiki locally