diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 748a5d644..027a91417 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1743,11 +1743,11 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ * * @param Vector3 $pos * @param float $maxDistance - * @param float $maxDiff default 0.71 (approximately sqrt(2) / 2, half of the diagonal width of a block) + * @param float $maxDiff defaults to half of the 3D diagonal width of a block * * @return bool */ - public function canInteract(Vector3 $pos, float $maxDistance, float $maxDiff = 0.71) : bool{ + public function canInteract(Vector3 $pos, float $maxDistance, float $maxDiff = M_SQRT3 / 2) : bool{ $eyePos = $this->getPosition()->add(0, $this->getEyeHeight(), 0); if($eyePos->distanceSquared($pos) > $maxDistance ** 2){ return false;