Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bri cassa 2021-04-04 21:01:44 +02:00
commit 5293673547
1 changed files with 2 additions and 1 deletions

View File

@ -156,7 +156,8 @@ minetest.register_craftitem(":mobs:hairball", {
local newpos = {x = pos.x + dir.x, y = pos.y + dir.y + 1.5, z = pos.z + dir.z}
local item = hairball_items[math.random(1, #hairball_items)]
if item ~= "" then
if item ~= ""
and minetest.registered_items[item] then
minetest.add_item(newpos, {name = item})
end