mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 09:31:07 +01:00
Fix possible crash when endermen tp away from sun
This commit is contained in:
parent
1fbdcc7426
commit
5bd4d7e6ea
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue