diff --git a/api.lua b/api.lua index 99590df..ebbdbc5 100644 --- a/api.lua +++ b/api.lua @@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20200112", + version = "20200123", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -4267,13 +4267,17 @@ function mobs:alias_mob(old_name, new_name) physical = false, - on_activate = function(self) + on_activate = function(self, staticdata) if minetest.registered_entities[new_name] then - minetest.add_entity(self.object:get_pos(), new_name) + minetest.add_entity(self.object:get_pos(), new_name, staticdata) end self.object:remove() + end, + + get_staticdata = function(self) + return self end }) end diff --git a/api.txt b/api.txt index 10ed372..61788d0 100644 --- a/api.txt +++ b/api.txt @@ -750,7 +750,7 @@ mobs:register_mob("mob_horse:horse", { if inv:room_for_item("main", "mobs:saddle") then inv:add_item("main", "mobs:saddle") else - minetest.add_item(clicker.getpos(), "mobs:saddle") + minetest.add_item(clicker.get_pos(), "mobs:saddle") end -- attach player to horse