Default/trees: Add requirement of light level 13 for sapling growth

This commit is contained in:
paramat 2015-10-16 11:51:27 +01:00
parent c15bd9d529
commit ef8b7e230d

View File

@ -16,6 +16,10 @@ local function can_grow(pos)
if is_soil == 0 then if is_soil == 0 then
return false return false
end end
local ll = minetest.get_node_light(pos)
if not ll or ll < 13 then -- Minimum light level for growth
return false -- matches grass, wheat and cotton
end
return true return true
end end