player.getTargetBlock(null, 200);

Read more of this post