StructureSpawnProvider 5.46.0
Tells the natural mob spawner where structure spawn areas are (see StructureSpawnArea), e.g. a structure generator remembering the swamp huts and fortresses it placed. Register with StructureSpawns::register().
Methods
getSpawnAreas()
php
public function getSpawnAreas(\pocketmine\world\World $world, int $x, int $z) : arrayReturns the structure spawn areas whose box contains the column (x, z) of the world. Called on the main thread for each successful cluster spawn attempt, so it must be cheap (e.g. a lookup by chunk).
