diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 1ac2c1f9..a7504af0 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -456,12 +456,7 @@ function mcl_util.calculate_durability(itemstack) end end end - if not uses then - for _, v in pairs(itemstack:get_tool_capabilities().groupcaps) do - uses = v.uses - break - end - end + uses = uses or (next(itemstack:get_tool_capabilities().groupcaps) or {}).uses end return uses or 0