mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-12-14 02:30:17 +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
|
_recipes[#recipes + 1 - k] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local shift = 0
|
||||||
|
|
||||||
|
if maxn(replacements[item]) > #_recipes then
|
||||||
|
shift = -1
|
||||||
|
end
|
||||||
|
|
||||||
for k, v in pairs(replacements[item]) do
|
for k, v in pairs(replacements[item]) do
|
||||||
_recipes[k].replacements = v
|
_recipes[k + shift].replacements = v
|
||||||
end
|
end
|
||||||
|
|
||||||
recipes = _recipes
|
recipes = _recipes
|
||||||
|
Loading…
Reference in New Issue
Block a user