mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Update mobs mod
(bugfix tamed mobs)
This commit is contained in:
parent
c8eaa28e41
commit
029ac189c6
@ -1,4 +1,4 @@
|
|||||||
-- Mobs Api (20th May 2015)
|
-- Mobs Api (22nd May 2015)
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
|
|
||||||
@ -1292,9 +1292,11 @@ function mobs:register_egg(mob, desc, background, addegg)
|
|||||||
pos.y = pos.y + 0.5
|
pos.y = pos.y + 0.5
|
||||||
local mob = minetest.add_entity(pos, mob)
|
local mob = minetest.add_entity(pos, mob)
|
||||||
local ent = mob:get_luaentity()
|
local ent = mob:get_luaentity()
|
||||||
-- set owner
|
if ent.type ~= "monster" then
|
||||||
ent.owner = placer:get_player_name()
|
ent.owner = placer:get_player_name() + -- set owner
|
||||||
ent.tamed = true
|
ent.tamed = true + ent.owner = placer:get_player_name()
|
||||||
|
ent.tamed = true
|
||||||
|
end
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
Loading…
Reference in New Issue
Block a user