From 770f4a0dc5bf52e14400e4ef0e9d34c6ffc3b756 Mon Sep 17 00:00:00 2001 From: Ginger88895 Date: Wed, 26 Jun 2019 11:48:56 +0800 Subject: [PATCH] Fixed multiple item drops --- init.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 16084bd..39a905f 100644 --- a/init.lua +++ b/init.lua @@ -332,15 +332,11 @@ if legacy_setting_getbool("item_drop.enable_item_drop", "enable_item_drop", true and not minetest.settings:get_bool("creative_mode") then function minetest.handle_node_drops(pos, drops) for i = 1,#drops do - local item = drops[i] + local item = ItemStack(drops[i]) local count, name - if type(item) == "string" then - count = 1 - name = item - else - count = item:get_count() - name = item:get_name() - end + + count = item:get_count() + name = item:get_name() -- Sometimes nothing should be dropped if name == ""