mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-06-28 06:30:18 +02:00
tidy code, stop mob attacking if player isnt seen for 11 seconds
This commit is contained in:
3
api.txt
3
api.txt
@ -395,13 +395,14 @@ another mod entirely, replace mob_class with the mob entity variable:
|
||||
|
||||
mob_class:mob_sound(sound) -- play sound at mob position
|
||||
mob_class:do_attack(player) -- if not already attacking, attack object given
|
||||
mob_class:stop_attack() -- stops mob attacking
|
||||
mob_class:collision() -- checks for player collision with mob and returns {x, z} vector
|
||||
mob_class:set_velocity(velocity) -- move at velocity in the facing direction
|
||||
mob_class:get_velocity() -- returns mob speed value
|
||||
mob_class:set_yaw(yaw, delay) -- change mob yaw, delay is for smooth rotation (default:0)
|
||||
mob_class:yaw_to_pos(pos, delay) -- rotates mod to look at position and returns new yaw
|
||||
mob_class:set_animation(animation, force) -- set mob animation
|
||||
mob_class:line_of_sight(pos1, pos2, stepsize) -- internal line of sight function
|
||||
mob_class:line_of_sight(pos1, pos2) -- internal line of sight function
|
||||
mob_class:attempt_flight_correction(override) -- check for stuck flying mobs and fix
|
||||
mob_class:update_tag(newname) -- update nametag or give new name
|
||||
mob_class:do_jump() -- check if mob can jump then jump
|
||||
|
Reference in New Issue
Block a user