mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-04-05 22:01:28 +02:00
Fix broken mcl_util.calculate_durability
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user