From: rubenwardy Date: Fri, 27 Jan 2017 19:48:27 +0000 (+0000) Subject: Fix node drops not being added to inventory when not in creative mode X-Git-Tag: 0.4.16~97 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b06368adf2c5e5d00fa2e34fb914e6bc67dc82cf;p=oweals%2Fminetest_game.git Fix node drops not being added to inventory when not in creative mode --- diff --git a/mods/creative/init.lua b/mods/creative/init.lua index 24700eb9..cd9e2b49 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -42,11 +42,14 @@ minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack 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() or - not creative.is_enabled_for(digger:get_player_name()) then + if not digger or not digger:is_player() then return end + if not creative.is_enabled_for(digger:get_player_name()) then + return old_handle_node_drops(pos, drops, digger) + end local inv = digger:get_inventory() if inv then for _, item in ipairs(drops) do