forked from LizzyFleckenstein03/Memeclone
Workaround for concrete powder hardening ABM crash
This commit is contained in:
parent
1740ccc2b2
commit
28c0c9d196
|
@ -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,
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue