mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 02:00:21 +01:00
Tamed eggs are removed from inventory even in creative
This commit is contained in:
parent
da5e8ef635
commit
8201282022
6
api.lua
6
api.lua
@ -3060,7 +3060,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
|
|||||||
-- spawn egg containing mob information
|
-- spawn egg containing mob information
|
||||||
minetest.register_craftitem(mob .. "_set", {
|
minetest.register_craftitem(mob .. "_set", {
|
||||||
|
|
||||||
description = desc .. " (set)",
|
description = desc .. " (Tamed)",
|
||||||
inventory_image = invimg,
|
inventory_image = invimg,
|
||||||
groups = {not_in_creative_inventory = 1},
|
groups = {not_in_creative_inventory = 1},
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
@ -3097,11 +3097,9 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
|
|||||||
ent.tamed = true
|
ent.tamed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if not in creative then take item
|
-- since mob is unique we remove egg once spawned
|
||||||
if not creative then
|
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user