PopulationCaps 5.46.0
Bedrock population caps: the maximum number of naturally spawned mobs of each population type in the 9x9 chunks around the chunk of a spawn attempt, separately for surface and underground ("cave") spawns, per dimension. Values from https://minecraft.wiki/w/Mob_spawning (Bedrock Edition, population caps).
Constants
AREA_RADIUS_CHUNKS
php
public const AREA_RADIUS_CHUNKS = 4The caps count the mobs within this many chunks (9x9 square) of the spawn attempt's chunk.
GLOBAL_CAP
php
public const GLOBAL_CAP = 200Bedrock global cap: naturally spawned mobs in the ticking area of a dimension.
Methods
get()
php
public static function get(\pocketmine\world\dimension\Dimension $dimension, string $population, bool $surface) : intReturns the cap of the population type in the dimension (0 for unknown types, e.g. "cat": cats spawn in villages only, see \pocketmine\world\mobs\VillageCatSpawner).
