mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 10:52:25 +01:00
on_pick_up api: remove empty stack entities
This commit is contained in:
parent
efb3072458
commit
1ac0da335a
@ -3134,7 +3134,7 @@ local function check_item_pickup(self)
|
||||
for k,v in pairs(self.pick_up) do
|
||||
if not player_near(p) and self.on_pick_up and l.itemstring:find(v) then
|
||||
local r = self.on_pick_up(self,l)
|
||||
if r then
|
||||
if r and r:get_count() > 0 then
|
||||
l.itemstring = r:to_string()
|
||||
else
|
||||
o:remove()
|
||||
|
Loading…
Reference in New Issue
Block a user