Fixed growing underground bug

This commit is contained in:
tenplus1 2015-06-27 13:08:56 +01:00
parent 899375e3c7
commit 024552dbe9

View File

@ -334,11 +334,12 @@ function farming.plant_growth_timer(pos, elapsed, node_name)
local growth
local light_pos = { x = pos.x, y = pos.y + 1, z = pos.z }
local light_pos = { x = pos.x, y = pos.y, z = pos.z }
local lambda = elapsed / STAGE_LENGTH_AVG
if lambda < 0.1 then return true end
if max_growth == 1 or lambda < 2.0 then
local light = (minetest.get_node_light(light_pos) or 0) -- CHANGED
print ("light level:", light)
if not in_range(light, MIN_LIGHT, MAX_LIGHT) then return true end
growth = 1
else