summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-07-13 15:58:54 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-07-13 15:58:54 +0100
commit5ad189430f8dad109d2d5e72a7ddf7577eef8bd2 (patch)
tree50ecc14245bee00a9259dd696444ad2d22fa9fa3
parent590c6e0b876a971891d852211ec51507548e729e (diff)
Bonemeal can grow snowy pines also
-rw-r--r--bonemeal.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/bonemeal.lua b/bonemeal.lua
index 04c0d9e..90a8bec 100644
--- a/bonemeal.lua
+++ b/bonemeal.lua
@@ -162,7 +162,16 @@ local function growth(pointed_thing)
default.grow_new_jungle_tree(pos)
elseif node.name == "default:pine_sapling" then
- default.grow_new_pine_tree(pos)
+
+ if #minetest.find_nodes_in_area(
+ {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
+ {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
+ {"default:snow", "default:snowblock", "default:dirt_with_snow"}) > 0 then
+
+ default.grow_new_snowy_pine_tree(pos)
+ else
+ default.grow_new_pine_tree(pos)
+ end
elseif node.name == "default:acacia_sapling" then
default.grow_new_acacia_tree(pos)