Simple; Make endermen perform checks to make sure that there is a route that the enderman could take to reach the point it's attempting to teleport to - at the very least, a route that a 1x1 flying animal could theoretically take. Possibly ignore this check where the destination point is in a light level below a certain level.
Long of the short of it: I don't like endermen teleporting into my bedroom D:
That might not be possible without eating ALL THE cpu cycles.
'Sides, it makes it more creepy when you're doing some random things and suddenly enderman.
The same check is performed when you sleep in a bed, and that doesn't "eat all the cpu cycles".
And part of the strength in something being creepy is that it's scarce. Dead bodies creep most people out, but not morticians, since they hang around dead bodies all of the time. When an enderman teleports into my bedroom every other morning, it becomes more of an annoyance than a fright.
Is it just me or does the Enderman go batshit insane when I look at him? He teleports next to me for a second, hits me, then goes around teleporting randomly everywhere.
Long of the short of it: I don't like endermen teleporting into my bedroom D:
'Sides, it makes it more creepy when you're doing some random things and suddenly enderman.
The same check is performed when you sleep in a bed, and that doesn't "eat all the cpu cycles".
And part of the strength in something being creepy is that it's scarce. Dead bodies creep most people out, but not morticians, since they hang around dead bodies all of the time. When an enderman teleports into my bedroom every other morning, it becomes more of an annoyance than a fright.