Fix droppers crashing when dropping an unknown item (#4810)

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4810
Reviewed-by: kno10 <kno10@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This commit is contained in:
Mikita Wiśniewski 2025-01-05 02:24:16 +01:00 committed by the-real-herowl
parent 2df6f7d5d4
commit 8a08f0dbcd

View file

@ -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