Skip to content

MaterialSystem 5.46.0 ​

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

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 $palette

Methods ​

__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) : void

getHeights() ​

php
public function getHeights() : array

Highest 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) : int

SurfaceSystem.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.

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