Fixed multiple item drops
parent
26d0532cbd
commit
770f4a0dc5
12
init.lua
12
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
|
and not minetest.settings:get_bool("creative_mode") then
|
||||||
function minetest.handle_node_drops(pos, drops)
|
function minetest.handle_node_drops(pos, drops)
|
||||||
for i = 1,#drops do
|
for i = 1,#drops do
|
||||||
local item = drops[i]
|
local item = ItemStack(drops[i])
|
||||||
local count, name
|
local count, name
|
||||||
if type(item) == "string" then
|
|
||||||
count = 1
|
count = item:get_count()
|
||||||
name = item
|
name = item:get_name()
|
||||||
else
|
|
||||||
count = item:get_count()
|
|
||||||
name = item:get_name()
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Sometimes nothing should be dropped
|
-- Sometimes nothing should be dropped
|
||||||
if name == ""
|
if name == ""
|
||||||
|
|
Loading…
Reference in New Issue