From 00f4cfa5b5216bfcfe41f11598ccf2f968c4262f Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 25 May 2021 01:33:26 +0200 Subject: [PATCH] simplify mcl_util code --- mods/CORE/mcl_util/init.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 1bf3add389..0168229f2c 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -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