From 8a08f0dbcdc23f91196311607ce7ce5c52acc3db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikita=20Wi=C5=9Bniewski?= Date: Sun, 5 Jan 2025 02:24:16 +0100 Subject: [PATCH] Fix droppers crashing when dropping an unknown item (#4810) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4810 Reviewed-by: kno10 Co-authored-by: Mikita Wiśniewski Co-committed-by: Mikita Wiśniewski --- mods/ITEMS/REDSTONE/mcl_droppers/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua index 13a5b879d..ac5d8d769 100644 --- a/mods/ITEMS/REDSTONE/mcl_droppers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_droppers/init.lua @@ -165,6 +165,8 @@ local dropperdef = { -- Check if the drop item has a custom handler local itemdef = minetest.registered_craftitems[dropitem:get_name()] + if not itemdef then return end + if itemdef._mcl_dropper_on_drop then item_dropped = itemdef._mcl_dropper_on_drop(dropitem, droppos) end