1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 01:30:38 +01:00

Update mobs mod

(bugfix tamed mobs)
This commit is contained in:
Quentin BUISSON-DEBON 2015-05-22 22:21:57 +02:00
parent c8eaa28e41
commit 029ac189c6

View File

@ -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