mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-01 07:13:45 +01:00
Prevent growing "around" things in the way.
This commit is contained in:
parent
2e8f56d098
commit
04efa74115
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user