mirror of
https://github.com/minetest-mods/carpets.git
synced 2024-12-20 20:35:42 +01:00
be sure recipe_def.groups is provided
This commit is contained in:
parent
245331c039
commit
92d7c46484
7
api.lua
7
api.lua
@ -49,10 +49,11 @@ function carpets.register(recipe, def)
|
||||
if not node.groups then
|
||||
node.groups = {}
|
||||
-- copy by value because of some changes
|
||||
for k, v in pairs(recipe_def.groups) do
|
||||
node.groups[k] = v
|
||||
if recipe_def.groups then
|
||||
for k, v in pairs(recipe_def.groups) do
|
||||
node.groups[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
node.groups.leafdecay = nil
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user