From 936c6f577ad70c9a467eaed58233e737671375df Mon Sep 17 00:00:00 2001 From: Novatux Date: Tue, 18 Mar 2014 20:02:18 +0100 Subject: [PATCH] Fix "ghost stacks" created when a player clicks an item on the ground: since the object is not immediately removed, any other code may still think an object is there, therefore leading to item duplication. This code therefore sets the itemstring to '' after the object is picked up to avoid such issues --- builtin/item_entity.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/item_entity.lua b/builtin/item_entity.lua index 95affe3d..0dcc2dc2 100644 --- a/builtin/item_entity.lua +++ b/builtin/item_entity.lua @@ -116,6 +116,7 @@ minetest.register_entity("__builtin:item", { return end end + self.itemstring = '' self.object:remove() end, })