spawn

Bring a creature into the game at a position you choose.

mobs.spawn(PIG, pos(0, 0, 0));

Parameters

  • mob: the type of creature to bring in.
  • destination: the position to bring the creature into the game at.

Difficulty level for monster mobs

To spawn ||mobs:monster|| mobs, the difficulty level for your world must be set to something that is greater than Peaceful, such as Easy, Normal, or Hard.

Example

Spawn on a cow near the current player. Moo!

mobs.spawn(COW, pos(1, 0, 0));

See also

||mobs:animal||, ||mobs:monster||