Skip to content
JasperLorelai edited this page May 19, 2024 · 16 revisions

Source Code

spell-class: ".targeted.SpawnEntitySpell"
Value Supported
entity false
location true
entity_from_location true

Description:

Spawns an entity at the targeted location.

Configuration:

Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.

Option Description Type Default Supports expressions
entity Entity Data config section false
main-hand Magic Item String air false
off-hand Magic Item String air false
helmet Magic Item String air false
chestplate Magic Item String air false
leggings Magic Item String air false
boots Magic Item String air false
main-hand-drop-chance Float 0 true
off-hand-drop-chance Float 0 true
helmet-drop-chance Float 0 true
chestplate-drop-chance Float 0 true
leggings-drop-chance Float 0 true
boots-drop-chance Float 0 true
y-offset Modifies mob's spawn height location. Float 0.1 true
duration Duration of the mob (in ticks). Integer 0 true
fire-ticks Amount of fire ticks applied to the mob. Integer 0 true
target-interval Integer -1 true
target-range Double 20 true
retarget-range Double 50 true
location Location where the mob should be spawned. May be: casteroffset:<y>, offset:<y>, caster, target, focus (for a target location spell, the location will be the target), or random (will spawn the mob randomly in a radius determined by spell power). String target true
nameplate-text Rich Text true
no-ai Boolean false
gravity Defines if the mob should obey gravity. Boolean true true
remove-ai Defines if the mob's ai be removed on spawn. Boolean false true
invulnerable Since 4.0 Beta 13. When true, makes the entity invulnerable to all kinds of damage. Boolean false true
remove-mob Removes the mob after MS reload. Boolean true true
use-caster-name Boolean false true
center-location Since 4.0 Beta 13. Centers the spawn location for the entity. Boolean true true
add-look-at-player-ai Adds mob goal where the mob constantly looks at players. Requires remove-ai. Boolean false true
allow-spawn-in-midair Boolean false true
cancel-attack Since 4.0 Beta 13. Determines whether or not the attacks done by a spawned entity are canceled when attack-spell is specified. Boolean true true
attack-spell Sub-spell which is casted when the mob attacks. String false
spell-on-spawn Sub-spell which is cast on spawn with the entity or its location as the target if applicable. String false
spell-on-death Since 4.0 Beta 14. Sub-spell cast on the spawned entity when it dies. String false
spell-on-target Since 4.0 Beta 14. Sub-spell on the target of the spawned entity when it changes targets. String false
attributes Attribute list for the mob. String List false
potion-effects Potion effect list for the mob. Each follows format potion duration strength ambient.
- potion: potion type
- duration: integer duration in server ticks (600 if unspecified)
- strength: integer (0 if unspecified)
- ambient: write ambient for ambient particles (false if unspecified)
String List false

Example:

Summon-Wolf:
    spell-class: ".targeted.SpawnEntitySpell"
    cooldown: 60
    location: caster
    entity:
        entity: wolf
        tamed: true
        color: blue
Clone this wiki locally