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

master
paramat 2015-10-16 11:51:27 +01:00 committed by Vanessa Ezekowitz
parent 3517dac679
commit c147f8b5b6
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ local function can_grow(pos)
if is_soil == 0 then
return false
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
end