Skip to content

LocateVanillaStructureTask 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\LocateVanillaStructureTask · source

Extends AsyncTask

Searches the closest start of a structure of a vanilla world on a /locate worker (see \pocketmine\world\locate\LocateWorkerPool): structure positions only depend on the seed and the generator settings, so the worker builds its own structure manager (kept for the next searches of the same world).

The result passed to the callback is [x, y, z, start chunk x, start chunk z], null if nothing was found, or RESULT_TIMEOUT.

Constants ​

RESULT_TIMEOUT ​

php
public const RESULT_TIMEOUT = "timeout"

Methods ​

__construct() ​

php
public function __construct(string $generatorClass, int $seed, string $generatorOptions, array $patterns, int $originX, int $originZ, int $radiusChunks, array $excludedStarts, int $timeoutSeconds, \Closure $onCompletion)

onCompletion() ​

php
public function onCompletion() : void

onError() ​

php
public function onError() : void

onRun() ​

php
public function onRun() : void

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