1
0
Fork 0

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.
This commit is contained in:
Elias Åström 2021-03-11 21:07:51 +01:00
parent 5b5a254b1a
commit 503b3a8149
1 changed files with 1 additions and 2 deletions

View File

@ -244,7 +244,7 @@ local overwrite = function()
-- Assign groups used for digging this node depending on -- Assign groups used for digging this node depending on
-- the registered digging groups -- the registered digging groups
for g, gdef in pairs(mcl_autogroup.registered_diggroups) do 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 ndef.groups[g] then
if gdef.levels then if gdef.levels then
newgroups[g .. "_0_dig"] = index newgroups[g .. "_0_dig"] = index
@ -252,7 +252,6 @@ local overwrite = function()
newgroups[g .. "_" .. i .. "_dig"] = index newgroups[g .. "_" .. i .. "_dig"] = index
end end
else else
local index = hardness_lookup[g][ndef._mcl_hardness]
newgroups[g .. "_dig"] = index newgroups[g .. "_dig"] = index
end end
end end