mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-08 16:19:37 +01:00
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:
parent
2df6f7d5d4
commit
8a08f0dbcd
1 changed files with 2 additions and 0 deletions
|
@ -165,6 +165,8 @@ local dropperdef = {
|
||||||
|
|
||||||
-- Check if the drop item has a custom handler
|
-- Check if the drop item has a custom handler
|
||||||
local itemdef = minetest.registered_craftitems[dropitem:get_name()]
|
local itemdef = minetest.registered_craftitems[dropitem:get_name()]
|
||||||
|
if not itemdef then return end
|
||||||
|
|
||||||
if itemdef._mcl_dropper_on_drop then
|
if itemdef._mcl_dropper_on_drop then
|
||||||
item_dropped = itemdef._mcl_dropper_on_drop(dropitem, droppos)
|
item_dropped = itemdef._mcl_dropper_on_drop(dropitem, droppos)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue