From 88f7a150c76a93a403570f9660bba5b98cab9950 Mon Sep 17 00:00:00 2001 From: kabou Date: Wed, 9 Mar 2022 04:00:48 +0100 Subject: [PATCH] Add check for unknown nodes. * Add check for unknown node in `handle_node_drops()` and return immediately if the dug node has no definition table. --- mods/ENTITIES/mcl_item_entity/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 678f8e2b7d..2c5acdc924 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -256,6 +256,8 @@ function minetest.handle_node_drops(pos, drops, digger) local silk_touch_drop = false local nodedef = minetest.registered_nodes[dug_node.name] + if not nodedef then return end + if shearsy_level and shearsy_level > 0 and nodedef._mcl_shears_drop then if nodedef._mcl_shears_drop == true then drops = { dug_node.name }