mirror of
https://codeberg.org/tenplus1/mobs_animal.git
synced 2024-12-22 08:50:26 +01:00
use mobs:add_mob function
This commit is contained in:
parent
0983d875ba
commit
e644a1b523
13
chicken.lua
13
chicken.lua
@ -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
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user