1
0
Fork 0

Fix broken mcl_util.calculate_durability

This commit is contained in:
Lizzy Fleckenstein 2021-12-02 17:28:19 +01:00
parent e6b200aaf3
commit 92686e5412
Signed by untrusted user: LizzyFleckenstein03
GPG Key ID: 06927A5199D6C9B2
1 changed files with 3 additions and 1 deletions

View File

@ -478,7 +478,9 @@ function mcl_util.calculate_durability(itemstack)
end end
end 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 end
return uses or 0 return uses or 0