Minecraft wiki entry for Hitboxes, associated text: Line of sight affects how mobs attack the player. If a hostile mob has a line of sight, it will begin attacking. For guardians, the player must maintain a line of sight for the entire charge-up of the attacking beam for it to do any damage. If the player's blue line is aiming towards an enderman's red rectangle and not wearing a pumpkin, the enderman will get angry at the player.