summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-02-14 08:54:54 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2017-02-14 08:54:54 +0000
commit8201282022c52ed154818a6dd974318970b2caaf (patch)
tree47c26a34aa6abbb4186ee9b4858c2d78691e9a18
parentda5e8ef63541b3386e2e3c2ed29aec4411e3139c (diff)
Tamed eggs are removed from inventory even in creative
-rw-r--r--api.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/api.lua b/api.lua
index d9750a8..87b1f56 100644
--- a/api.lua
+++ b/api.lua
@@ -3060,7 +3060,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
-- spawn egg containing mob information
minetest.register_craftitem(mob .. "_set", {
- description = desc .. " (set)",
+ description = desc .. " (Tamed)",
inventory_image = invimg,
groups = {not_in_creative_inventory = 1},
stack_max = 1,
@@ -3097,10 +3097,8 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
ent.tamed = true
end
- -- if not in creative then take item
- if not creative then
- itemstack:take_item()
- end
+ -- since mob is unique we remove egg once spawned
+ itemstack:take_item()
end
return itemstack