no grow tree

This commit is contained in:
proller 2013-11-03 04:31:42 +04:00
parent 158cfc73df
commit 2f527f6cf9

View file

@ -389,6 +389,7 @@ minetest.register_abm({
interval = 10, interval = 10,
chance = 50, chance = 50,
action = function(pos, node) action = function(pos, node)
if weather and minetest.get_heat(pos) < 5 then return end
local is_soil = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name].groups.soil local is_soil = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name].groups.soil
if is_soil == nil or is_soil == 0 then return end if is_soil == nil or is_soil == 0 then return end
print("A sapling grows into a tree at "..minetest.pos_to_string(pos)) print("A sapling grows into a tree at "..minetest.pos_to_string(pos))
@ -486,6 +487,7 @@ minetest.register_abm({
interval = 1, interval = 1,
chance = 1, chance = 1,
action = function(pos, node) action = function(pos, node)
if weather and minetest.get_heat(pos) < 15 then return end
local is_soil = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name].groups.soil local is_soil = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name].groups.soil
if is_soil == nil or is_soil == 0 then return end if is_soil == nil or is_soil == 0 then return end
print("A jungle sapling grows into a tree at "..minetest.pos_to_string(pos)) print("A jungle sapling grows into a tree at "..minetest.pos_to_string(pos))