MonsterSpawner
Extends Spawnable
Deprecated
This class is deprecated.
Constants
DEFAULT_MAX_NEARBY_ENTITIES
php
public const DEFAULT_MAX_NEARBY_ENTITIES = 6DEFAULT_MAX_SPAWN_DELAY
php
public const DEFAULT_MAX_SPAWN_DELAY = 800DEFAULT_MIN_SPAWN_DELAY
php
public const DEFAULT_MIN_SPAWN_DELAY = 200DEFAULT_REQUIRED_PLAYER_RANGE
php
public const DEFAULT_REQUIRED_PLAYER_RANGE = 16DEFAULT_SPAWN_PER_ATTEMPT 5.46.0
php
public const DEFAULT_SPAWN_PER_ATTEMPT = 4Vanilla SpawnCount default (spawners made by world generation only store the mob).
DEFAULT_SPAWN_RANGE
php
public const DEFAULT_SPAWN_RANGE = 4Methods
addAdditionalSpawnData() protected
php
protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidgetEntityTypeId() 5.46.0
php
public function getEntityTypeId() : stringReturns the Bedrock identifier of the mob shown in (and spawned by) the spawner, or ":" if it's empty.
getLastUpdateTick() 5.46.0
php
public function getLastUpdateTick() : intServer tick of the last spawner update, to keep a single update chain (not saved).
getMaxNearbyEntities() 5.46.0
php
public function getMaxNearbyEntities() : intgetMaxSpawnDelay() 5.46.0
php
public function getMaxSpawnDelay() : intgetMinSpawnDelay() 5.46.0
php
public function getMinSpawnDelay() : intgetRequiredPlayerRange() 5.46.0
php
public function getRequiredPlayerRange() : intgetSpawnDelay() 5.46.0
php
public function getSpawnDelay() : intTicks left before the next spawn attempt; -1 means a new delay is drawn first.
getSpawnPerAttempt() 5.46.0
php
public function getSpawnPerAttempt() : intgetSpawnRange() 5.46.0
php
public function getSpawnRange() : intreadSaveData()
php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidsetEntityTypeId() 5.46.0
php
public function setEntityTypeId(string $entityTypeId) : voidSets the mob of the spawner, e.g. "minecraft:zombie". This drops any spawn data or potentials loaded from the world, since they would override it.
setLastUpdateTick() 5.46.0
php
public function setLastUpdateTick(int $tick) : voidsetSpawnDelay() 5.46.0
php
public function setSpawnDelay(int $spawnDelay) : voidwriteSaveData() protected
php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void