aboutsummaryrefslogtreecommitdiff
path: root/builtin/item.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/item.lua')
-rw-r--r--builtin/item.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/item.lua b/builtin/item.lua
index 1b4b4d25a..4ed20e4f1 100644
--- a/builtin/item.lua
+++ b/builtin/item.lua
@@ -262,7 +262,8 @@ function minetest.node_dig(pos, node, digger)
minetest.debug("node_dig")
local def = ItemStack({name=node.name}):get_definition()
- if not def.diggable or (def.can_dig and not def.can_dig(pos,digger)) then
+ -- Check if def ~= 0 because we always want to be able to remove unknown nodes
+ if #def ~= 0 and not def.diggable or (def.can_dig and not def.can_dig(pos,digger)) then
minetest.debug("not diggable")
minetest.log("info", digger:get_player_name() .. " tried to dig "
.. node.name .. " which is not diggable "