getLineOfSight

public abstract List<Block> getLineOfSight(Set<Material> transparent, int maxDistance)

Gets all blocks along the living entity's line of sight.

This list contains all blocks from the living entity's eye position to target inclusive.

Return

list containing all blocks along the living entity's line of sight

Parameters

transparent

HashSet containing all transparent block Materials (set to null for only air)

maxDistance

this is the maximum distance to scan (may be limited by server by at least 100 blocks, no less)