mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Fix broken mcl_util.calculate_durability
This commit is contained in:
parent
e6b200aaf3
commit
92686e5412
@ -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 New Issue
Block a user