MaterialSystem 5.46.0
Vanilla's surface/material stage: runs the noise settings' material rule (26.3+ "material_rule": bedrock floor, ore veins, biome surfaces, badlands bands, deepslate...) on every solid block of the terrain, top to bottom per column, plus the hardcoded eroded badlands pillars and frozen ocean icebergs.
Properties
$palette
php
public readonly \pocketmine\world\generator\vanilla\surface\MaterialPalette $paletteMethods
__construct()
php
public function __construct(\pocketmine\world\generator\vanilla\WorldgenData $data, \pocketmine\world\generator\vanilla\NoiseRouter $router, \pocketmine\world\generator\vanilla\biome\ClimateBiomeTree $tree, int $seed, ?string $compileDir = null, ?\pocketmine\world\generator\vanilla\compiler\CompiledKernel $kernel = null, string $settingsId = "overworld")apply()
php
public function apply(\pocketmine\world\generator\vanilla\TerrainChunk $terrain) : voidgetHeights()
php
public function getHeights() : arrayHighest non-air block per column ((x << 4) | z) of the chunk the rules were last applied to.
topMaterial()
php
public function topMaterial(array $heights, int $localX, int $y, int $localZ, bool $fluid) : intSurfaceSystem.topMaterial(): the material rule result for a block of the chunk the rules were last applied to, as a floor block with nothing solid around (stone depth 1 above and below), optionally under a fluid. Used by the carvers on dirt uncovered under grass. Returns a palette id or MaterialRule::NONE.
