LocateVanillaStructureTask 5.46.0
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() : voidonError()
php
public function onError() : voidonRun()
php
public function onRun() : void