From c558e30ea55b1a93710f53093c07fa2bbe87bc32 Mon Sep 17 00:00:00 2001 From: cora Date: Tue, 15 Jun 2021 01:13:24 +0200 Subject: [PATCH] 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. --- mods/CORE/_mcl_autogroup/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/CORE/_mcl_autogroup/init.lua b/mods/CORE/_mcl_autogroup/init.lua index ba8b659c0..e04fb2eac 100644 --- a/mods/CORE/_mcl_autogroup/init.lua +++ b/mods/CORE/_mcl_autogroup/init.lua @@ -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