Update trees.lua

This commit is contained in:
Ryan 2015-11-11 18:11:31 +00:00
parent d248261faf
commit b489d9a984

View file

@ -5,7 +5,8 @@
-- 'Can grow' function
local random = math.random
local min_light_level = tonumber(minetest.setting_get("trees_min_light_level")) or 13
local function can_grow(pos)
local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
if not node_under then
@ -17,7 +18,6 @@ local function can_grow(pos)
return false
end
local light_level = minetest.get_node_light(pos)
local min_light_level = tonumber(minetest.setting_get("trees_min_light_level")) or 13
if not light_level or light_level < min_light_level then
return false
end