Skip to content

InterpolationCache 5.46.0 ​

final class · pocketmine\world\generator\vanilla\surface\InterpolationCache · source

Cell corner values of "interpolated" density functions for the chunk being decorated, so that material rules using them (ore veins, the preliminary surface) interpolate between corners like vanilla's NoiseChunk instead of sampling the input at every block.

Methods ​

clear() ​

php
public function clear() : void

collect() ​

php
public static function collect(\pocketmine\world\generator\vanilla\density\DensityFunction $f) : array

corner() ​

php
public function corner(\pocketmine\world\generator\vanilla\density\InterpolatedFunction $f, int $x, int $y, int $z) : float

inject() ​

php
public function inject(array $nodes, int $x, int $y, int $z) : void

Makes every interpolated node of the given graphs return its interpolated value at this block.

range() ​

php
public function range(\pocketmine\world\generator\vanilla\density\InterpolatedFunction $f, int $x0, int $y0, int $z0, int $x1, int $y1, int $z1) : array

Range of the interpolated values inside a block box. Trilinear interpolation stays between the corners of the cells, and inside one cell its extremes are at the corners of the box.

value() ​

php
public function value(\pocketmine\world\generator\vanilla\density\InterpolatedFunction $f, int $x, int $y, int $z) : float

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