mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 01:25:09 +00:00
Fix server crash when players dig unknown nodes
Digging unknown nodes crashes the Clamity Minetest server, which runs modified Minetest: https://github.com/ClamityAnarchy/minetest Crashes did occur with commit d5434bf008 of that Minetest version. This commit makes unknown nodes explicitly not harvestable.
This commit is contained in:
parent
031ae5fcb5
commit
79766bff23
1 changed files with 4 additions and 0 deletions
|
@ -207,6 +207,10 @@ end
|
|||
function mcl_autogroup.can_harvest(nodename, toolname)
|
||||
local ndef = minetest.registered_nodes[nodename]
|
||||
|
||||
if not ndef then
|
||||
return false
|
||||
end
|
||||
|
||||
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
|
||||
return true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue