forked from VoxeLibre/VoxeLibre
Merge pull request 'CORE/_mcl_autogroup: Prevent server crash on digging unknown' (#85) from fix-dig-unknown-crash into master
Reviewed-on: Mineclonia/Mineclonia#85 Reviewed-by: erlehmann <nils+git.minetest.land@dieweltistgarnichtso.net>
This commit is contained in:
commit
6c311d5528
|
@ -207,6 +207,10 @@ end
|
||||||
function mcl_autogroup.can_harvest(nodename, toolname)
|
function mcl_autogroup.can_harvest(nodename, toolname)
|
||||||
local ndef = minetest.registered_nodes[nodename]
|
local ndef = minetest.registered_nodes[nodename]
|
||||||
|
|
||||||
|
if not ndef then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
|
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue