From c34aecfcab25e6f0ed62a28d46d4f1417d0b3bde Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sun, 29 Sep 2024 13:57:52 +0200 Subject: [PATCH] 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: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4551 Reviewed-by: the-real-herowl Co-authored-by: teknomunk Co-committed-by: teknomunk --- mods/ITEMS/mcl_bamboo/globals.lua | 2 +- mods/ITEMS/mcl_ocean/kelp.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 37fafc2fd..9c7db5486 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -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 diff --git a/mods/ITEMS/mcl_ocean/kelp.lua b/mods/ITEMS/mcl_ocean/kelp.lua index 0b43b9775..e51466145 100644 --- a/mods/ITEMS/mcl_ocean/kelp.lua +++ b/mods/ITEMS/mcl_ocean/kelp.lua @@ -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