From ca033d0e8d87b93463dc177b0ae5e802455a2461 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 1 Jun 2024 23:25:42 +0000 Subject: [PATCH] Correctly refresh enchantment tool capabilities in mcl_potions haste/fatigue effects (#4355) Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4355 Reviewed-by: the-real-herowl Co-authored-by: teknomunk Co-committed-by: teknomunk --- mods/ITEMS/mcl_potions/functions.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 429c177bb..96028bb60 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -1091,6 +1091,7 @@ function mcl_potions.update_haste_and_fatigue(player) if f_fac ~= 1 then meta:set_float("mcl_potions:fatigue", 1 - f_fac) else meta:set_string("mcl_potions:fatigue", "") end meta:set_tool_capabilities() + meta:set_string("groupcaps_hash","") mcl_enchanting.update_groupcaps(item) if h_fac == 0 and f_fac == 1 then player:set_wielded_item(item) @@ -1399,6 +1400,7 @@ function mcl_potions._reset_haste_fatigue_item_meta(player) meta:set_string("mcl_potions:haste", "") meta:set_string("mcl_potions:fatigue", "") meta:set_tool_capabilities() + meta:set_string("groupcaps_hash","") mcl_enchanting.update_groupcaps(item) end end