diff options
Diffstat (limited to 'youngtrees')
-rw-r--r-- | youngtrees/init.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/youngtrees/init.lua b/youngtrees/init.lua index ddd4637..ae4f9e6 100644 --- a/youngtrees/init.lua +++ b/youngtrees/init.lua @@ -117,17 +117,17 @@ abstract_youngtrees.grow_youngtree_node = function(pos, height) if minetest.get_node(right_here).name == "air" -- instead of check_air = true, or minetest.get_node(right_here).name == "default:junglegrass" then if height == 1 then - minetest.set_node(right_here, {name="youngtrees:youngtree_top"}) + minetest.swap_node(right_here, {name="youngtrees:youngtree_top"}) end if height == 2 then - minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"}) - minetest.set_node(above_right_here, {name="youngtrees:youngtree_top"}) + minetest.swap_node(right_here, {name="youngtrees:youngtree_bottom"}) + minetest.swap_node(above_right_here, {name="youngtrees:youngtree_top"}) end if height == 3 then local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z} - minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"}) - minetest.set_node(above_right_here, {name="youngtrees:youngtree_middle"}) - minetest.set_node(two_above_right_here, {name="youngtrees:youngtree_top"}) + minetest.swap_node(right_here, {name="youngtrees:youngtree_bottom"}) + minetest.swap_node(above_right_here, {name="youngtrees:youngtree_middle"}) + minetest.swap_node(two_above_right_here, {name="youngtrees:youngtree_top"}) end end end |