getCrosshairTarget

open fun getCrosshairTarget(target: BlockPlacementTarget?, rotation: Rotation): BlockHitResult?

Traces from the player's current eye, which is the eye the server uses when it processes the interaction. target's aim may have been derived from a predicted position, so this is the check that decides whether the click actually happens.