Replace deprecated get_entity_name
This commit is contained in:
parent
4dc1d6b43b
commit
e2442a6283
5 changed files with 12 additions and 8 deletions
|
@ -120,7 +120,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", {
|
|||
|
||||
local objects = minetest.get_objects_inside_radius(pos, 1)
|
||||
for _,obj in ipairs(objects) do
|
||||
local name = obj:get_entity_name()
|
||||
local name = self.name
|
||||
if name~="mobs_mc:roar_of_the_dragon2" and name ~= "mobs_mc:enderdragon" then
|
||||
obj:set_hp(obj:get_hp()-0.05)
|
||||
if (obj:get_hp() <= 0) then
|
||||
|
|
|
@ -95,7 +95,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon", {
|
|||
|
||||
local objects = minetest.get_objects_inside_radius(pos, 1)
|
||||
for _,obj in ipairs(objects) do
|
||||
local name = obj:get_entity_name()
|
||||
local name = self.name
|
||||
if name~="mobs_mc:roar_of_the_dragon" and name ~= "mobs_mc:wither" then
|
||||
obj:set_hp(obj:get_hp()-0.05)
|
||||
if (obj:get_hp() <= 0) then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue