forked from mtcontrib/maidroid
Fix item use bug
This commit is contained in:
parent
29bb2a8752
commit
d811ecc9cb
@ -263,9 +263,10 @@ function maidroid.register_egg(egg_name, def)
|
|||||||
inventory_image = def.inventory_image,
|
inventory_image = def.inventory_image,
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
|
|
||||||
on_use = function(item_stack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
if pointed_thing.above ~= nil and def.product_name ~= nil then
|
if pointed_thing.above ~= nil and def.product_name ~= nil then
|
||||||
minetest.add_entity(pointed_thing.above, def.product_name)
|
minetest.add_entity(pointed_thing.above, def.product_name)
|
||||||
|
itemstack:take_item()
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user