Skip to content


Fix node drops not being added to inventory when not in creative mode
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Jan 27, 2017
1 parent 1dd9fdb commit b06368a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mods/creative/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack

-- 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
if not creative.is_enabled_for(digger:get_player_name()) then
return old_handle_node_drops(pos, drops, digger)
local inv = digger:get_inventory()
if inv then
for _, item in ipairs(drops) do
Expand Down

0 comments on commit b06368a

Please sign in to comment.