Skip to content

Commit

Permalink
check for unknown items
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames authored and BuckarooBanzay committed Jun 30, 2023
1 parent 30cd5e1 commit 858c956
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mob_drops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ local function add_drop_recipes(name)
return
end
for _,drop in pairs(mob.drops) do
unified_inventory.register_craft({
type = drop.min > 0 and "mob_drop" or "mob_drop_player",
output = drop.name,
items = {name},
width = 0,
})
if minetest.registered_items[drop.name] then
unified_inventory.register_craft({
type = drop.min > 0 and "mob_drop" or "mob_drop_player",
output = drop.name,
items = {name},
width = 0,
})
end
end
end

Expand Down

0 comments on commit 858c956

Please sign in to comment.