mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
Fix broken mcl_util.calculate_durability
This commit is contained in:
parent
e6b200aaf3
commit
92686e5412
1 changed files with 3 additions and 1 deletions
|
@ -478,7 +478,9 @@ function mcl_util.calculate_durability(itemstack)
|
|||
end
|
||||
end
|
||||
end
|
||||
uses = uses or (next(itemstack:get_tool_capabilities().groupcaps) or {}).uses
|
||||
|
||||
local _, groupcap = next(itemstack:get_tool_capabilities().groupcaps)
|
||||
uses = uses or (groupcap or {}).uses
|
||||
end
|
||||
|
||||
return uses or 0
|
||||
|
|
Loading…
Reference in a new issue