From a7e102426a49bf1c60381621e65cdaa9e87bb6d5 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sat, 17 Apr 2021 21:01:09 +0200 Subject: [PATCH] Add time_of_day to get_light crash fix --- mods/ENTITIES/mcl_mobs/api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index 1b5715b2..8aed3728 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -1029,10 +1029,10 @@ local node_ok = function(pos, fallback) return minetest.registered_nodes[fallback] end -local function get_light(pos) +local function get_light(pos, tod) if math.abs(pos.x) < 31000 and math.abs(pos.y) < 31000 and math.abs(pos.z) < 31000 then local lightfunc = minetest.get_natural_light or minetest.get_node_light - return lightfunc(pos) + return lightfunc(pos, tod) else return 0 end