mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-12-22 13:52:29 +01:00
Do not drop items when a Node Breaker digs a node
This commit is contained in:
parent
682a345495
commit
8ef6ba3c0f
8
init.lua
8
init.lua
@ -373,7 +373,13 @@ and not minetest.settings:get_bool("creative_mode") then
|
||||
end
|
||||
end
|
||||
|
||||
function minetest.handle_node_drops(pos, drops)
|
||||
local old_handle_node_drops = minetest.handle_node_drops
|
||||
function minetest.handle_node_drops(pos, drops, player)
|
||||
if player.is_fake_player then
|
||||
-- Node Breaker or similar machines should receive items in the
|
||||
-- inventory
|
||||
return old_handle_node_drops(pos, drops, player)
|
||||
end
|
||||
for i = 1,#drops do
|
||||
local item = drops[i]
|
||||
if type(item) == "string" then
|
||||
|
Loading…
Reference in New Issue
Block a user