diff options
Diffstat (limited to 'builtin/game/item.lua')
-rw-r--r-- | builtin/game/item.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua index 6628a4081..0f10af8ee 100644 --- a/builtin/game/item.lua +++ b/builtin/game/item.lua @@ -349,12 +349,16 @@ function core.item_drop(itemstack, dropper, pos) v.y = v.y*2 + 2 v.z = v.z*2 obj:setvelocity(v) + return itemstack end else - core.add_item(pos, itemstack) + if core.add_item(pos, itemstack) then + return itemstack + end end - return itemstack + -- If we reach this, adding the object to the + -- environment failed end function core.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed_thing) |