Workaround for concrete powder hardening ABM crash

This commit is contained in:
Wuzzy 2019-03-14 08:13:54 +01:00
parent 1740ccc2b2
commit 28c0c9d196
1 changed files with 6 additions and 1 deletions

View File

@ -169,7 +169,12 @@ minetest.register_abm({
neighbors = {"group:water"},
action = function(pos, node)
local harden_to = minetest.registered_nodes[node.name]._mcl_colorblocks_harden_to
minetest.swap_node(pos, { name = harden_to, param = node.param, param2 = node.param2 })
-- It should be impossible for harden_to to be nil, but a Minetest bug might call
-- the ABM on the new concrete node, which isn't part of this ABM!
if harden_to then
node.name = harden_to
minetest.set_node(pos, node)
end
end,
})