From 92686e5412b593776bcc9c5568c94e0aea23a8eb Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Thu, 2 Dec 2021 17:28:19 +0100 Subject: [PATCH] Fix broken mcl_util.calculate_durability --- mods/CORE/mcl_util/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index d91c86f094..d548f6cac7 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -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