Fix crash on consumewield with door recipe

This commit is contained in:
Aaron Suen 2023-05-20 09:49:39 -04:00
parent 2220666bbf
commit 205ff184fa

View File

@ -169,7 +169,7 @@ local function craftcheck(recipe, pos, node, data, xx, xz, zx, zz)
v.name, v.scatter, v.count, v.velocity)
end
end
if recipe.consumewield then
if recipe.consumewield and data.crafter then
nodecore.consume_wield(data.crafter, recipe.consumewield)
elseif recipe.toolgroups and recipe.toolwear and data.crafter then
nodecore.wear_wield(data.crafter, recipe.toolgroups, recipe.toolwear)