1
0
Fork 0

Fix possible crash when endermen tp away from sun

This commit is contained in:
cora 2022-08-31 11:56:35 +02:00 committed by Gitea
parent 1fbdcc7426
commit 5bd4d7e6ea
1 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,8 @@ mcl_mobs:register_mob("mobs_mc:enderman", {
end end
end end
else --if not attacking try to tp to the dark 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) self:teleport(nil)
end end
end end