Skip to main content

The mob

On Night End​

mob.night_end

Runs once when the night ends in the mob's world

Goes on with: Next

On Spawn​

mob.spawn

Runs once when the mob has spawned, after its equipment and extension are set up

Goes on with: Next

On Tick​

mob.tick

Runs every server tick

Goes on with: Next

Change Movement​

mob.movement

Switches how this mob moves, e.g. to flee once it is hurt; its movement numbers stay

Goes on with: Next

Extension​

mob.extension

The entity riding or carrying the mob; missing when it has none

OutTypeWhat it is
Entitythe extensionThe entity riding or carrying the mob, as its own entity type; missing when it has none

Is Moving​

mob.has_path

Whether a mob is walking along a path right now

InTypeWhat it is
MobMobThe mob
OutTypeWhat it is
ResultBooleanWhether it has a path it follows

Move To​

mob.move_to

Lets a mob walk to a location along a path it finds; nothing happens without one

InTypeWhat it is
MobMobThe mob that walks
LocationLocationWhere it walks to
Speed (optional)NumberHow fast, 1 for its own speed; 1 when not given
OutTypeWhat it is
FoundBooleanWhether it found a path

Goes on with: Next

Self​

mob.self

The mob this behaviour belongs to, as its own entity type, e.g. a Creeper

OutTypeWhat it is
Entitythe mobThe mob this behaviour belongs to

Stop Moving​

mob.stop_moving

Lets a mob stop walking where it stands; its AI may soon walk on

InTypeWhat it is
MobMobThe mob that stops

Goes on with: Next