diff --git a/api.lua b/api.lua index f0aa777..e2103c0 100644 --- a/api.lua +++ b/api.lua @@ -1,4 +1,4 @@ --- Mobs Api (20th May 2015) +-- Mobs Api (22nd May 2015) mobs = {} mobs.mod = "redo" @@ -1260,9 +1260,11 @@ function mobs:register_egg(mob, desc, background, addegg) pos.y = pos.y + 0.5 local mob = minetest.add_entity(pos, mob) local ent = mob:get_luaentity() - -- set owner - ent.owner = placer:get_player_name() - ent.tamed = true + if ent.type ~= "monster" then + -- set owner + ent.owner = placer:get_player_name() + ent.tamed = true + end itemstack:take_item() end return itemstack