From ca38bb2390a0bc7d7e24ba1a6f5b9bd1dc014cf1 Mon Sep 17 00:00:00 2001 From: raymoo Date: Sun, 1 Oct 2017 18:20:50 -0700 Subject: [PATCH] Creative: Make handle_node_drops override work for non-player diggers --- mods/creative/init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/creative/init.lua b/mods/creative/init.lua index 51d6f792..a33475dd 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -46,10 +46,8 @@ end) -- Don't pick up if the item is already in the inventory local old_handle_node_drops = minetest.handle_node_drops function minetest.handle_node_drops(pos, drops, digger) - if not digger or not digger:is_player() then - return - end - if not creative.is_enabled_for(digger:get_player_name()) then + if not digger or not digger:is_player() or + not creative.is_enabled_for(digger:get_player_name()) then return old_handle_node_drops(pos, drops, digger) end local inv = digger:get_inventory() -- 2.25.1