Skip to content

CarverSystem 5.46.0 ​

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

Vanilla's carver stage (ChunkGenerator.applyCarvers()), after the material rules: every chunk within 8 chunks of the target may start tunnels (caves, canyons) according to the carvers of its biome; each carver of the list gets its own java.util.Random seeded with the large feature seed (world seed + carver index, chunk position) and starts when its first float is within the carver's probability.

Constants ​

RADIUS ​

php
public const RADIUS = 8

Start chunks considered around the target: the carvers' range * 2 (applyCarvers uses 8).

Methods ​

apply() ​

php
public function apply(\pocketmine\world\generator\vanilla\TerrainChunk $terrain) : void

Carves the chunk (whose material rules must have just been applied by the MaterialSystem given to create()). The carved blocks are stored in TerrainChunk::$carvingMask.

create() ​

php
public static function create(\pocketmine\world\generator\vanilla\WorldgenData $data, \pocketmine\world\generator\vanilla\NoiseRouter $router, \pocketmine\world\generator\vanilla\biome\ClimateBiomeTree $tree, int $seed, \pocketmine\world\generator\vanilla\surface\MaterialSystem $materials, ?\pocketmine\world\generator\vanilla\compiler\CompiledKernel $kernel) : ?self

Returns null when the data has no carver definitions (cache made before 26.3 / without worldgen/carver) or no biome has carvers (the End).

setLargeFeatureSeed() ​

php
public static function setLargeFeatureSeed(\pocketmine\world\generator\vanilla\random\LegacyRandom $random, int $seed, int $chunkX, int $chunkZ) : void

WorldgenRandom.setLargeFeatureSeed()

startCarvers() ​

php
public function startCarvers(int $chunkX, int $chunkZ) : array

Carvers that chunk ($chunkX, $chunkZ) may start, in the order of its biome's carver list.

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