fix crash with craftable items that have no usages

This commit is contained in:
goblin_mode 2024-09-15 18:26:27 +02:00 committed by ryvnf
parent 8ab2f59a34
commit de0d860411

View File

@ -252,7 +252,7 @@ local function get_recipes(item, data, player)
end
if data.show_usages then
recipes = table.copy(usages_cache[item]) or {}
recipes = usages_cache[item] and table.copy(usages_cache[item]) or {}
local item_groups = minetest.registered_items[item].groups
local required_groups