InterpolatedFunction 5.46.0
Extends DensityFunction
"minecraft:interpolated": the input is sampled at cell corners and trilinearly interpolated in between. Chunk fillers evaluate the input at corners and push the interpolated value via $current before evaluating the outer function; compute() falls back to interpolating on the fly (used for single-point queries).
Properties
$cellHeight
php
public readonly int $cellHeight$cellWidth
php
public readonly int $cellWidth$current
php
public float $current$input
php
public readonly \pocketmine\world\generator\vanilla\density\DensityFunction $input$useCurrent
php
public bool $useCurrentSet by chunk fillers while $current holds the value for the block being evaluated.
Methods
__construct()
php
public function __construct(\pocketmine\world\generator\vanilla\density\DensityFunction $input, int $cellWidth, int $cellHeight)children()
php
public function children() : arraycompute()
php
public function compute(float $x, float $y, float $z) : floatdependsOnY()
php
public function dependsOnY() : boollerp3()
php
public static function lerp3(float $fx, float $fy, float $fz, float $c000, float $c100, float $c010, float $c110, float $c001, float $c101, float $c011, float $c111) : floatTrilinear interpolation in the same order as vanilla's NoiseChunk (y first, then x, then z).
