getTargetBlock

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

Gets the block that the living entity has targeted.

Return

block that the living entity has targeted

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)