Skip to content

NativeTerrainFiller 5.46.0 ​

final class · pocketmine\world\generator\vanilla\native\NativeTerrainFiller · source

Implements TerrainFiller

Terrain filler backed by the vanillagen helper process: same output as the PHP fillers, several times faster. On any failure (helper missing, crashed, too old...) it logs once and permanently switches this generator to the PHP filler built by the fallback factory.

Methods ​

__construct() ​

php
public function __construct(?\pocketmine\world\generator\vanilla\native\NativeTerrainClient $client, \Closure $fallbackFactory)

connect() ​

php
public static function connect(string $dataDir, int $seed, array $biomeNames, int $minY, int $height, \Closure $fallbackFactory, int $flags = 0, string $settings = "overworld") : ?self

Connects to the helper published by the main thread (VanillaNativeBackend). Returns null (and logs why, unless no helper was published) if the native core cannot be used.

fill() ​

php
public function fill(int $chunkX, int $chunkZ, ?\pocketmine\world\generator\vanilla\structure\Beardifier $beardifier = null) : \pocketmine\world\generator\vanilla\TerrainChunk

getClient() ​

php
public function getClient() : ?\pocketmine\world\generator\vanilla\native\NativeTerrainClient

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