From 503b3a81490a3a8b66db836d3c1574b0b9e8341e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Thu, 11 Mar 2021 21:07:51 +0100 Subject: [PATCH] Fix some nodes not being diggable Previously some nodes like "mcl_flowers:double_grass_top" would be undiggable. This was because they did not define _mcl_hardness and it was not defaulted to 0 in all parts of _mcl_autogroup. --- mods/CORE/_mcl_autogroup/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mods/CORE/_mcl_autogroup/init.lua b/mods/CORE/_mcl_autogroup/init.lua index bd8e249c4c..e6e800aa14 100644 --- a/mods/CORE/_mcl_autogroup/init.lua +++ b/mods/CORE/_mcl_autogroup/init.lua @@ -244,7 +244,7 @@ local overwrite = function() -- Assign groups used for digging this node depending on -- the registered digging groups for g, gdef in pairs(mcl_autogroup.registered_diggroups) do - local index = hardness_lookup[g][ndef._mcl_hardness] + local index = hardness_lookup[g][ndef._mcl_hardness or 0] if ndef.groups[g] then if gdef.levels then newgroups[g .. "_0_dig"] = index @@ -252,7 +252,6 @@ local overwrite = function() newgroups[g .. "_" .. i .. "_dig"] = index end else - local index = hardness_lookup[g][ndef._mcl_hardness] newgroups[g .. "_dig"] = index end end