From cb1814f6aec5a45db898e6bdf66a67006154952d Mon Sep 17 00:00:00 2001 From: kno10 Date: Sun, 29 Dec 2024 15:56:57 +0100 Subject: [PATCH] tooldef can be nil (#4767) Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4767 Reviewed-by: the-real-herowl Co-authored-by: kno10 Co-committed-by: kno10 --- mods/ENTITIES/mcl_item_entity/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 08ead7f26..7f5056617 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -319,7 +319,7 @@ function minetest.handle_node_drops(pos, drops, digger) end -- Special node drops (crushing) when digging with a hammer - local hammer = tooldef.groups.hammer + local hammer = tooldef and tooldef.groups.hammer if hammer and hammer > 0 and nodedef._vl_crushing_drop then drops = nodedef._vl_crushing_drop -- Fortune drops