1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2024-12-22 17:00:26 +01:00

use mobs:add_mob function

This commit is contained in:
tenplus1 2023-09-25 13:17:48 +01:00
parent 0983d875ba
commit e644a1b523

View File

@ -102,7 +102,7 @@ mobs:register_mob("mobs_animal:chicken", {
pos = pos,
gain = 1.0,
max_hear_distance = 5
})
}, true)
end
})
@ -174,10 +174,13 @@ mobs:register_arrow("mobs_animal:egg_entity", {
return
end
local staticdata = minetest.serialize(
{child = true, tamed = true, owner = self.playername})
minetest.add_entity(pos, "mobs_animal:chicken", staticdata)
mobs:add_mob(pos, {
name = "mobs_animal:chicken",
child = true,
owner = self.playername,
-- nametag = "Chicky",
ignore_count = true -- ignores mob count per map area
})
end
})