fixed tamed monsters bug
This commit is contained in:
parent
dff36cfbfc
commit
bbb82e1306
10
api.lua
10
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user