Skip to content

DensityFunction 5.46.0 ​

abstract class · pocketmine\world\generator\vanilla\density\DensityFunction · source

Node of a vanilla density function graph (worldgen/density_function), bound to a world seed. compute() is the reference (interpreted) evaluation; the generated code backend produces the same values.

Properties ​

$maxValue ​

php
public readonly float $maxValue

$minValue ​

php
public readonly float $minValue

Methods ​

__construct() ​

php
public function __construct(float $minValue, float $maxValue)

children() ​

php
abstract public function children() : array

compute() ​

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

dependsOnY() ​

php
public function dependsOnY() : bool

Whether the value can change with the y coordinate (false = can be cached per column).

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