mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 03:07:32 +01:00
Fix possible crash when endermen tp away from sun
This commit is contained in:
parent
1fbdcc7426
commit
5bd4d7e6ea
@ -345,7 +345,8 @@ mcl_mobs:register_mob("mobs_mc:enderman", {
|
||||
end
|
||||
end
|
||||
else --if not attacking try to tp to the dark
|
||||
if minetest.get_node_light(enderpos) > minetest.LIGHT_MAX then
|
||||
local light = minetest.get_node_light(enderpos)
|
||||
if light and light > minetest.LIGHT_MAX then
|
||||
self:teleport(nil)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user