> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/features/enchantments/custom-enchantments/actions/spawn-mob.md).

# Spawn Mob

Action to spawn mobs.

## Tags

### `variable` -> The variable of the action to get custom placeholders or execute functions:

**%\<variable>.x%** -> The x position of the mob.

**%\<variable>.y%** -> The y position of the mob.

**%\<variable>.z%** -> The z position of the mob.

**%\<variable>.world%** -> The world where the mob is.<br>

**%\<variable>.remove%** -> Removes the mob.

**%\<variable>.setVelocity(0, 0, 0)%** -> Sets the mob velocity.

**%\<variable>.moveTo(x, y, z, time)%** -> Moves the mob using velocity to a location. The time is put in seconds. It will move the mob in that time.

**%\<variable>.tp(x, y, z)%** -> Teleports the mob to that location.

**%\<variable>.setRotation(yaw, pitch)%** -> Sets the mob facing rotation using yaw and pitch.

### `pos` -> The position where the mob will spawn.

### `mob` -> The mob (an EntityType, or FALLING\_BLOCK).

### `collidable` -> Whether or not the mob will be collidable.

### `invisible` -> Whether or not the mob will be invisible.

### `invulnerable` -> Whether or not the mob will be invulnerable.

### `velocity` -> The mob velocity. This is useful to propel the mob.

### `gravity` -> Whether or not the mob is affected by gravity.

### `hitbox` -> Whether or not the mob has a hitbox.

### `baby` -> Whether or not the mob will be a baby.

### `ia` -> Whether or not the mob will have ia.

### `itemsAdderMob` -> Whether or not the mob is an ItemsAdder mob.

### `armorStandSmall` -> Whether or not the armor stand will be small, just for armor stands.

### `slimeSize` -> The slime size, just for slimes.

### `magmaSize` -> The magma size, just for magma cubes.

### `fallingBlock` -> The falling block material, such as STONE (just for falling blocks).

### `mobPassenger` -> If the mob will have another mob as a passenger.

### `passengerGravity` -> Will the passenger be affected by gravity?

### `rotation` -> The mob facing rotation.

### `deleteAfter` -> When the mob will be deleted in seconds after spawning.

## Examples

{% code overflow="wrap" fullWidth="false" %}

```yaml
spawnmob <mob>COW</mob> <variable>mymob</variable> <pos>%global.playerworld%,
    %global.playerx%, %global.playery%, %global.playerz%</pos> <deleteAfter>5</deleteAfter>
```

{% endcode %}

{% code overflow="wrap" %}

```yaml
spawnmob <mob>ZOMBIE</mob> <variable>myzombie</variable> <pos>%global.playerworld%,
    %global.playerx%, %global.playery%, %global.playerz%</pos> <invulnerable>true</invulnerable> <velocity>0, 2, 0</velocity> <deleteAfter>5</deleteAfter>
```

{% endcode %}
