Skip to content

Aquifer 5.46.0 ​

final class · pocketmine\world\generator\vanilla\Aquifer · source

Noise-based aquifers: local water/lava levels in 16x12x16 cells with barriers between them (vanilla 1.18+ behaviour; structure follows misode/deepslate's NoiseAquifer, MIT, with Java 26.3's semantics where deepslate 0.27.2 differs: both section offsets when sampling the surface, floorDiv(z, 16) and the x10 spread for fluid level cells).

Java 26.3 details checked against a real server: aquifer centers are spread by nextInt(10), nextInt(9), nextInt(10); the center column is sampled first when looking for the surface; a center at the same distance as a previous one takes its place in the nearest-three ordering; the density samplers return floats (so every noise value read here is rounded to single precision, and the spread is multiplied by 10 in single precision), while the similarity and barrier pressure math is done in double precision.

Materials are the MATERIAL_* constants; -1 means "keep the default block" (stone).

Constants ​

MATERIAL_AIR ​

php
public const MATERIAL_AIR = 0

MATERIAL_LAVA ​

php
public const MATERIAL_LAVA = 3

MATERIAL_STONE ​

php
public const MATERIAL_STONE = 1

MATERIAL_WATER ​

php
public const MATERIAL_WATER = 2

Methods ​

__construct() ​

php
public function __construct(\pocketmine\world\generator\vanilla\NoiseRouter $router, \pocketmine\world\generator\vanilla\random\PositionalRandomFactory $random, int $chunkX, int $chunkZ, \pocketmine\world\generator\vanilla\density\DensityFunction $barrier, \pocketmine\world\generator\vanilla\density\DensityFunction $floodedness, \pocketmine\world\generator\vanilla\density\DensityFunction $spread,  …

computeSubstance() ​

php
public function computeSubstance(int $x, int $y, int $z, float $density) : int

Returns one of the MATERIAL_* constants, or -1 when the block stays solid (default block).

floorDiv() ​

php
public static function floorDiv(int $a, int $b) : int

getSkipSamplingAboveY() ​

php
public function getSkipSamplingAboveY() : int

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