MaterialContext 5.46.0
State of the block being decorated by the material rules (vanilla's material rule context): position, depth of solid blocks above/below, fluid level above, the column's surface depth noise, plus lazily computed column and block values (secondary surface noise, preliminary surface level, steepness, biome).
Properties
$biomes
public readonly \pocketmine\world\generator\vanilla\surface\SurfaceBiomes $biomes$blockStamp
public int $blockStamp$blockX
public int $blockX$blockY
public int $blockY$blockZ
public int $blockZ$chunkStamp
public int $chunkStampIncremented for every chunk / column / block, for caches.
$columnStamp
public int $columnStamp$height
public readonly int $height$heights
public array $heightsHighest non-air block per column ((x << 4) | z), like the WORLD_SURFACE_WG heightmap; kept up to date while blocks are changed.
$interpolation
public readonly \pocketmine\world\generator\vanilla\surface\InterpolationCache $interpolation$localX
public int $localX$localZ
public int $localZ$minY
public readonly int $minY$seaLevel
public readonly int $seaLevel$stoneDepthAbove
public int $stoneDepthAbove$stoneDepthBelow
public int $stoneDepthBelow$surfaceDepth
public int $surfaceDepthPer column: (int) (surface noise * 2.75 + 3 + random * 0.25)
$waterHeight
public int $waterHeightMethods
__construct()
public function __construct(\pocketmine\world\generator\vanilla\noise\NoiseStack $surfaceNoise, \pocketmine\world\generator\vanilla\noise\NoiseStack $surfaceSecondaryNoise, \pocketmine\world\generator\vanilla\random\PositionalRandomFactory $random, \pocketmine\world\generator\vanilla\density\DensityFunction $chunkSurfaceLevel, \pocketmine\world\generator\vanilla\surface\InterpolationCache $interpo …beginChunk()
public function beginChunk() : voidbiome()
public function biome() : intminSurfaceLevel()
public function minSurfaceLevel() : intPreliminary surface level of the column (interpolated per chunk) + surface depth - 8.
noise2d()
public function noise2d(\pocketmine\world\generator\vanilla\noise\NoiseStack $noise) : floatnoise3d()
public function noise3d(\pocketmine\world\generator\vanilla\noise\NoiseStack $noise) : floatsteep()
public function steep() : boolSteep slope facing south (along z) or west (along x), from the heights of the neighbouring columns in the chunk.
surfaceSecondary()
public function surfaceSecondary() : floatupdateXZ()
public function updateXZ(int $localX, int $localZ, int $blockX, int $blockZ) : voidupdateY()
public function updateY(int $stoneDepthAbove, int $stoneDepthBelow, int $waterHeight, int $y) : voidMoves to another block of the column (MaterialSystem sets the same fields inline in its loop).
