mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-22 19:03:43 +01:00
Fix replacements
This commit is contained in:
parent
6e6ff93d29
commit
f88e0412fc
8
init.lua
8
init.lua
@ -709,8 +709,14 @@ local function cache_recipes(item)
|
||||
_recipes[#recipes + 1 - k] = v
|
||||
end
|
||||
|
||||
local shift = 0
|
||||
|
||||
if maxn(replacements[item]) > #_recipes then
|
||||
shift = -1
|
||||
end
|
||||
|
||||
for k, v in pairs(replacements[item]) do
|
||||
_recipes[k].replacements = v
|
||||
_recipes[k + shift].replacements = v
|
||||
end
|
||||
|
||||
recipes = _recipes
|
||||
|
Loading…
Reference in New Issue
Block a user