do you mean get the block where the player's crosshair is looking or just the block in front if the player's direction
if they don't have split touch enabled on mobile, if you want to know where the crosshair is, it will still be the center of their screen
You can use PHP: $player->getTargetBlock($distance); That accounts for player's direction vector (aka crosshair).
use Player->getDirection(); Code: 0: 'x+' 1: 'z+' 2: 'x-' 3: 'z-' PHP: /** @var Vector3 $vec */$vec = null;/** @var Player $player */switch($player->getDirection()) { case 0: $vec = $player->add(1); break; case 1: $vec = $player->add(0, 0, 1); break; case 2: $vec = $player->subtract(1); break; case 3: $vec = $player->subtract(0, 0, 1);}