Don't make 'ignore' nodes break bamboo or kelp (#4551)

This modifies the behavior of kelp and bamboo so that neither breaks when an unloaded node is encountered.

Reviewed-on: VoxeLibre/VoxeLibre#4551
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
This commit is contained in:
teknomunk 2024-09-29 13:57:52 +02:00 committed by the-real-herowl
parent 9cb4f51468
commit c34aecfcab
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ function mcl_bamboo.break_orphaned(pos)
local node_name = node_below.name
-- short circuit checks.
if mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then
if node_name == "ignore" or mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then
return
end

View File

@ -196,7 +196,7 @@ function kelp.find_unsubmerged(pos, node, height)
for i=1,height do
walk_pos.y = y + i
local walk_node = mt_get_node(walk_pos)
if not kelp.is_submerged(walk_node) then
if walk_node.name ~= "ignore" and not kelp.is_submerged(walk_node) then
return walk_pos, walk_node, height, i
end
end