Skip to content

DistanceToPointFunction 5.46.0 ​

final class · pocketmine\world\generator\vanilla\density\DistanceToPointFunction · source

Extends DensityFunction

"minecraft:distance_to_point": distance from the block to a fixed point.

Constants ​

METRIC_CHEBYSHEV ​

php
public const METRIC_CHEBYSHEV = 3

METRIC_EUCLIDEAN ​

php
public const METRIC_EUCLIDEAN = 0

METRIC_EUCLIDEAN_SQUARED ​

php
public const METRIC_EUCLIDEAN_SQUARED = 1

METRIC_MANHATTAN ​

php
public const METRIC_MANHATTAN = 2

Properties ​

$metric ​

php
public readonly int $metric

$pointX ​

php
public readonly float $pointX

$pointY ​

php
public readonly float $pointY

$pointZ ​

php
public readonly float $pointZ

Methods ​

__construct() ​

php
public function __construct(float $pointX, float $pointY, float $pointZ, int $metric)

children() ​

php
public function children() : array

compute() ​

php
public function compute(float $x, float $y, float $z) : float

dependsOnY() ​

php
public function dependsOnY() : bool

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.