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:
parent
0983d875ba
commit
e644a1b523
13
chicken.lua
13
chicken.lua
@ -102,7 +102,7 @@ mobs:register_mob("mobs_animal:chicken", {
|
|||||||
pos = pos,
|
pos = pos,
|
||||||
gain = 1.0,
|
gain = 1.0,
|
||||||
max_hear_distance = 5
|
max_hear_distance = 5
|
||||||
})
|
}, true)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -174,10 +174,13 @@ mobs:register_arrow("mobs_animal:egg_entity", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local staticdata = minetest.serialize(
|
mobs:add_mob(pos, {
|
||||||
{child = true, tamed = true, owner = self.playername})
|
name = "mobs_animal:chicken",
|
||||||
|
child = true,
|
||||||
minetest.add_entity(pos, "mobs_animal:chicken", staticdata)
|
owner = self.playername,
|
||||||
|
-- nametag = "Chicky",
|
||||||
|
ignore_count = true -- ignores mob count per map area
|
||||||
|
})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user