fix crafting recipe detection for wood nodes
This commit is contained in:
parent
ae58f848f7
commit
b853f52bd6
@ -244,12 +244,14 @@ minetest.after(0.2, function ()
|
|||||||
local assoc = {}
|
local assoc = {}
|
||||||
for _,wood in ipairs(wood_nodes) do
|
for _,wood in ipairs(wood_nodes) do
|
||||||
local recipes = minetest.get_all_craft_recipes(wood)
|
local recipes = minetest.get_all_craft_recipes(wood)
|
||||||
|
if recipes then
|
||||||
for _, recipe in ipairs(recipes) do
|
for _, recipe in ipairs(recipes) do
|
||||||
if recipe.items and #recipe.items == 1 then
|
if recipe.items and #recipe.items == 1 then
|
||||||
assoc[recipe.items[1]] = wood
|
assoc[recipe.items[1]] = wood
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Register sawmill craft
|
-- Register sawmill craft
|
||||||
for tree, wood in pairs(assoc) do
|
for tree, wood in pairs(assoc) do
|
||||||
|
Loading…
Reference in New Issue
Block a user