mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
simplify mcl_util code
This commit is contained in:
parent
0cc11d0bbb
commit
00f4cfa5b5
1 changed files with 1 additions and 3 deletions
|
@ -457,9 +457,7 @@ function mcl_util.calculate_durability(itemstack)
|
|||
end
|
||||
end
|
||||
if not uses then
|
||||
local toolcaps = itemstack:get_tool_capabilities()
|
||||
local groupcaps = toolcaps.groupcaps
|
||||
for _, v in pairs(groupcaps) do
|
||||
for _, v in pairs(itemstack:get_tool_capabilities().groupcaps) do
|
||||
uses = v.uses
|
||||
break
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue