From 79766bff23facb9e5c4caa81597cbd1b6477d648 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 c8475d0b..d714db7d 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