use mobs:add_mob() to add obsidian flan, also lava damages ob flan

This commit is contained in:
tenplus1 2020-06-22 21:24:57 +01:00
parent a6b6795eb4
commit a39eec8822
1 changed files with 5 additions and 2 deletions

View File

@ -70,7 +70,9 @@ mobs:register_mob("mobs_monster:lava_flan", {
self.object:remove() self.object:remove()
if math.random(4) == 1 then if math.random(4) == 1 then
minetest.add_entity(pos, "mobs_monster:obsidian_flan") mobs:add_mob(pos, {
name = "mobs_monster:obsidian_flan",
})
end end
else else
if minetest.get_node(pos).name == "air" then if minetest.get_node(pos).name == "air" then
@ -229,9 +231,10 @@ mobs:register_mob("mobs_monster:obsidian_flan", {
floats = 0, floats = 0,
drops = { drops = {
{name = "default:obsidian_shard", chance = 1, min = 1, max = 5}, {name = "default:obsidian_shard", chance = 1, min = 1, max = 5},
{name = "default:obsidian", chance = 3, min = 0, max = 2},
}, },
water_damage = 0, water_damage = 0,
lava_damage = 0, lava_damage = 8,
light_damage = 0, light_damage = 0,
animation = { animation = {
speed_normal = 15, speed_normal = 15,