Skip to content

CarvingRun 5.46.0 ​

final class · pocketmine\world\generator\vanilla\carver\CarvingRun · source

Carving of one chunk (the target): the ellipsoids of every tunnel that reaches it are carved into its materials, in vanilla's order. Blocks are carved at most once (carving mask); bedrock and the other uncarvable blocks stay; the replacement comes from the chunk's aquifer at density 0 (water, lava, air, or nothing near aquifer barriers), and dirt uncovered under carved grass gets the biome's top material again.

Properties ​

$heights ​

php
public array $heights

$mask ​

php
public array $mask

Carved blocks (same index as TerrainChunk::$materials).

$materials ​

php
public array $materials

$middleX ​

php
public readonly float $middleX

$middleZ ​

php
public readonly float $middleZ

Methods ​

__construct() ​

php
public function __construct(int $chunkX, int $chunkZ, int $minY, int $height, int $seaLevel, array $materials, array $heights, ?\pocketmine\world\generator\vanilla\Aquifer $aquifer, array $uncarvable, int $grass, int $mycelium, int $dirt, \Closure $topMaterial, int $seaMaterial = \pocketmine\world\generator\vanilla\Aquifer::MATERIAL_WATER)

carveEllipsoid() ​

php
public function carveEllipsoid(float $x, float $y, float $z, float $horizontalRadius, float $verticalRadius, float $floorLevel, ?array $widthFactors) : void

WorldCarver.carveEllipsoid(): carves the blocks of the target chunk inside the ellipsoid, column by column, top to bottom.

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