summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenplus1 <kinsellaja@yahoo.com>2015-06-27 13:08:56 +0100
committertenplus1 <kinsellaja@yahoo.com>2015-06-27 13:08:56 +0100
commit024552dbe9db4e4b25eb31372bfef8d8cfe98558 (patch)
treeb15d19835a6d20e2ceea48bbf006a1efec195c87
parent899375e3c76e719b6b83020cc98296a9ae7868b4 (diff)
Fixed growing underground bug
-rw-r--r--init.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 94e9832..4ea0b06 100644
--- a/init.lua
+++ b/init.lua
@@ -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