From d811ecc9cb11fc97e59b2027b2ccea5f05f3eb12 Mon Sep 17 00:00:00 2001 From: tacigar Date: Wed, 21 Dec 2016 20:38:40 +0900 Subject: [PATCH] Fix item use bug --- maidroid/api.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maidroid/api.lua b/maidroid/api.lua index d2bf535..fc5cf27 100644 --- a/maidroid/api.lua +++ b/maidroid/api.lua @@ -263,9 +263,10 @@ function maidroid.register_egg(egg_name, def) inventory_image = def.inventory_image, 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 minetest.add_entity(pointed_thing.above, def.product_name) + itemstack:take_item() return itemstack end return nil