Skip to content

WorldCarver 5.46.0 ​

abstract class · pocketmine\world\generator\vanilla\carver\WorldCarver · source

A configured carver of the worldgen data (worldgen/carver, 26.3+ format): carves tunnels started from one chunk into the chunk being generated.

Constants ​

RANGE ​

php
public const RANGE = 4

Chunks around a start chunk that its tunnels can reach (WorldCarver.getRange()).

Properties ​

$id ​

php
public readonly string $id

$probability ​

php
public readonly float $probability

$y ​

php
public readonly \pocketmine\world\generator\vanilla\carver\ValueProvider $y

Methods ​

__construct() ​

php
public function __construct(string $id, float $probability, \pocketmine\world\generator\vanilla\carver\ValueProvider $y)

canReach() ​

php
public static function canReach(\pocketmine\world\generator\vanilla\carver\CarvingRun $run, float $x, float $z, int $step, int $steps, float $thickness) : bool

WorldCarver.canReach(): whether a tunnel at (x, z) with the given steps left can still reach the target chunk.

carve() ​

php
abstract public function carve(\pocketmine\world\generator\vanilla\carver\CarvingRun $run, \pocketmine\world\generator\vanilla\random\LegacyRandom $random, int $startX, int $startZ) : void

Carves the tunnels started in chunk ($startX, $startZ) into the target chunk of $run.

fromJson() ​

php
public static function fromJson(string $id, array $json, int $minY, int $height) : self

isStartChunk() ​

php
public function isStartChunk(\pocketmine\world\generator\vanilla\random\LegacyRandom $random) : bool

ConfiguredWorldCarver.isStartChunk(): the first draw of the start chunk's random.

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