From 04efa74115c86bcca5c589e5320092b9dd700a99 Mon Sep 17 00:00:00 2001 From: Michieal Date: Wed, 11 Jan 2023 02:19:19 -0500 Subject: [PATCH] Prevent growing "around" things in the way. --- mods/ITEMS/mcl_bamboo/globals.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 822938f4cf..f1e585b622 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -192,6 +192,10 @@ function mcl_bamboo.grow_bamboo(pos, bonemeal_applied) node_name = minetest.get_node(chk_pos).name dist = vector.distance(soil_pos, chk_pos) + if node_name ~= "air" and mcl_bamboo.is_bamboo(node_name) == false then + break + end + -- stop growing check. ie, handle endcap placement. if dist >= height - 1 then local above_node_name = minetest.get_node(vector.offset(chk_pos, 0, 1, 0)).name