mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 04:23:44 +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
|
item = reg_aliases[item] or item
|
||||||
local def = reg_items[item]
|
local def = reg_items[item]
|
||||||
if not def then return end
|
if not def then return end
|
||||||
local recipes = get_all_recipes(item) or {}
|
local recipes = get_all_recipes(item)
|
||||||
|
|
||||||
for i = 1, #recipes do
|
if recipes then
|
||||||
recipes_cache[item] = table_merge(recipes_cache[item] or {}, recipes[i])
|
recipes_cache[item] = table_merge(recipes_cache[item], recipes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user