1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-01-23 16:00:16 +01:00

add mobs:is_invisible() function, update api.txt

This commit is contained in:
tenplus1 2024-11-16 08:16:55 +00:00
parent 2e4664a5ce
commit bde53c3475
2 changed files with 19 additions and 1 deletions

View File

@ -19,7 +19,7 @@ end
mobs = { mobs = {
mod = "redo", mod = "redo",
version = "20241114", version = "20241116",
spawning_mobs = {}, spawning_mobs = {},
translate = S, translate = S,
node_snow = has(minetest.registered_aliases["mapgen_snow"]) node_snow = has(minetest.registered_aliases["mapgen_snow"])
@ -1217,6 +1217,10 @@ local function is_invisible(self, player_name)
end end
end end
function mobs:is_invisible(self, player_name)
return is_invisible(self, player_name)
end
-- should mob follow what I'm holding ? -- should mob follow what I'm holding ?
function mob_class:follow_holding(clicker) function mob_class:follow_holding(clicker)

14
api.txt
View File

@ -904,3 +904,17 @@ Rideable Horse Example Mob
-------------------------- --------------------------
See mob_horse mod https://codeberg.org/tenplus1/mob_horse See mob_horse mod https://codeberg.org/tenplus1/mob_horse
External Functions
------------------
These are a list of utility functions that can be called from 3rd party mods.
mobs:alias_mob(old_name, new_name)
mobs:is_invisible(self, player_name)
mobs:is_dangerous(self, nodename)
mobs:yaw_to_pos(self, target, rotation_steps)
mobs:line_of_sight(self, pos1, pos2)
mobs:set_animation(self, animation)
mobs:yaw(self, yaw, rotation_steps)