From 029ac189c64476a09c558d748a16fa15c6595d91 Mon Sep 17 00:00:00 2001 From: Quentin BUISSON-DEBON Date: Fri, 22 May 2015 22:21:57 +0200 Subject: [PATCH] Update mobs mod (bugfix tamed mobs) --- mods/mobs/api.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index 534fcbf3..395cc6c7 100644 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -1,4 +1,4 @@ --- Mobs Api (20th May 2015) +-- Mobs Api (22nd May 2015) mobs = {} mobs.mod = "redo" @@ -1292,9 +1292,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 + ent.owner = placer:get_player_name() + -- set owner + ent.tamed = true + ent.owner = placer:get_player_name() + ent.tamed = true + end itemstack:take_item() end return itemstack