mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-12-14 18:50:17 +01:00
Fix possible missed items in cache
This commit is contained in:
parent
e6d1857799
commit
c0823faad3
6
init.lua
6
init.lua
@ -700,10 +700,10 @@ local function cache_recipes(item)
|
||||
item = reg_aliases[item] or item
|
||||
local def = reg_items[item]
|
||||
if not def then return end
|
||||
local recipes = get_all_recipes(item) or {}
|
||||
local recipes = get_all_recipes(item)
|
||||
|
||||
for i = 1, #recipes do
|
||||
recipes_cache[item] = table_merge(recipes_cache[item] or {}, recipes[i])
|
||||
if recipes then
|
||||
recipes_cache[item] = table_merge(recipes_cache[item], recipes)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user