diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index d70bf77e9..8415084e1 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -346,6 +346,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", { end end end + -- AGRESSIVELY WARP/CHASE PLAYER BEHAVIOUR HERE. if self.state == "attack" then if self.attack then @@ -358,9 +359,11 @@ mcl_mobs.register_mob("mobs_mc:enderman", { end end else --if not attacking try to tp to the dark - local light = minetest.get_node_light(enderpos) - if light and light > minetest.LIGHT_MAX then - self:teleport(nil) + if dim == 'overworld' then + local light = minetest.get_node_light(enderpos) + if light and light > minetest.LIGHT_MAX then + self:teleport(nil) + end end end -- ARROW / DAYTIME PEOPLE AVOIDANCE BEHAVIOUR HERE. @@ -454,8 +457,8 @@ mcl_mobs.register_mob("mobs_mc:enderman", { if mob then local entity = mob:get_luaentity() if entity and entity.name == "mobs_mc:endermite" then - self.state = 'attack' self.attack = mob + self.state = 'attack' end end end