getLastTwoTargetBlocks

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

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

The target block will be the last block in the list.

Return

list containing the last 2 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. This may be further limited by the server, but never to less than 100 blocks