mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-19 06:49:32 +01:00
Workaround for concrete powder hardening ABM crash
This commit is contained in:
parent
1740ccc2b2
commit
28c0c9d196
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue