simplify mcl_util code

This commit is contained in:
AFCMS 2021-05-25 01:33:26 +02:00
parent 0cc11d0bbb
commit 00f4cfa5b5

View file

@ -457,9 +457,7 @@ function mcl_util.calculate_durability(itemstack)
end end
end end
if not uses then if not uses then
local toolcaps = itemstack:get_tool_capabilities() for _, v in pairs(itemstack:get_tool_capabilities().groupcaps) do
local groupcaps = toolcaps.groupcaps
for _, v in pairs(groupcaps) do
uses = v.uses uses = v.uses
break break
end end