How do I keep Endermen out of my house?

Solution 1:

You can prevent mobs spawning by providing enough lighting.

However, Endermen can still teleport inside your building. According to http://minecraft.gamepedia.com/Enderman when they teleport, they must do so to a block made from movement-blocking material (i.e. blocks you cannot move through, but suffocate from, see http://minecraft.gamepedia.com/Materials#cite_note-4) such as dirt.

They however cannot teleport there if they would land inside a solid block (blocks with a collision box, i.e. you can stand on them, see: http://minecraft.gamepedia.com/Solid_block). Thus endermen typically need at least three non-solid blocks above the destination (the movement-blocking block) to successfully teleport.

Knowing this, the ways to prevent them from teleporting into your abode would be to make your rooms 2 blocks high, with a solid block as the ceiling or, alternatively, make your floor out of blocks from non-movement-blocking material.

Note however that the wiki is not very specific about the effect of the material on certain block types. For example, stone is listed as a movement-blocking material, but stone slabs do not block movement. Some testing should clear that up. Simple create a new custom super-flat world with the top-layer being from the material you want to test with. See http://minecraft.gamepedia.com/Superflat for detailed info on how to do that, specifically the preset code format section and below. Of course, setting your world to Peaceful will prevent all hostile mobs from spawning....