diff options
Diffstat (limited to 'bushes')
-rw-r--r-- | bushes/init.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bushes/init.lua b/bushes/init.lua index b880bd2..ea61887 100644 --- a/bushes/init.lua +++ b/bushes/init.lua @@ -183,14 +183,14 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type) if minetest.get_node(right_here).name == "air" -- instead of check_air = true, or minetest.get_node(right_here).name == "default:junglegrass" then - minetest.set_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir}) + minetest.swap_node(right_here, {name="bushes:bushbranches"..bush_branch_type , param2=dir}) --minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")") - minetest.set_node(above_right_here, {name="bushes:BushLeaves"..leaf_type}) + minetest.swap_node(above_right_here, {name="bushes:BushLeaves"..leaf_type}) local chance_of_high_leaves = math.random(1,10) if chance_of_high_leaves> 5 then local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z} --minetest.chat_send_all("leaf_type: (" .. leaf_type .. ")") - minetest.set_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type}) + minetest.swap_node(two_above_right_here, {name="bushes:BushLeaves"..leaf_type}) end end end @@ -229,12 +229,12 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height) if height == 4 then local two_above_right_here_south = {x=pos.x, y=pos.y+3, z=pos.z-1} local three_above_right_here_south = {x=pos.x, y=pos.y+4, z=pos.z-1} - minetest.set_node(right_here, {name="bushes:youngtree2_bottom"}) - minetest.set_node(above_right_here, {name="bushes:youngtree2_bottom"}) - minetest.set_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2}) - minetest.set_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0}) - minetest.set_node(three_above_right_here, {name="bushes:BushLeaves1" }) - minetest.set_node(three_above_right_here_south, {name="bushes:BushLeaves1" }) + minetest.swap_node(right_here, {name="bushes:youngtree2_bottom"}) + minetest.swap_node(above_right_here, {name="bushes:youngtree2_bottom"}) + minetest.swap_node(two_above_right_here, {name="bushes:bushbranches2" , param2=2}) + minetest.swap_node(two_above_right_here_south, {name="bushes:bushbranches2" , param2=0}) + minetest.swap_node(three_above_right_here, {name="bushes:BushLeaves1" }) + minetest.swap_node(three_above_right_here_south, {name="bushes:BushLeaves1" }) end end |