Mobs (excluding Zombies, Spiders and Slimes) cannot draw line of sight through glass. ... Reminder: Hostile mobs will follow you even if something blocks their line of sight, as long as you're not out of range.