Skip to content

Beacon ​

final class · pocketmine\block\tile\Beacon · source

Extends Spawnable
Implements Nameable

Block entity of beacons ("Beacon").

Saved and sent to the client: "primary" and "secondary" (TAG_Int, Bedrock effect IDs, 0 = none), the same keys as GeyserMC BeaconInventoryTranslator and PowerNukkitX. The Bedrock client works the pyramid level out by itself from the blocks it sees, so the level is not saved; it is recomputed every 80 ticks.

Methods ​

addAdditionalSpawnData() protected ​

php
protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

getDefaultName() 5.46.0 ​

php
public function getDefaultName() : string

getLastUpdateTick() 5.46.0 ​

php
public function getLastUpdateTick() : int

getPrimaryEffect() ​

php
public function getPrimaryEffect() : int

getPyramidLevel() 5.46.0 ​

php
public function getPyramidLevel() : int

getSecondaryEffect() ​

php
public function getSecondaryEffect() : int

isActive() 5.46.0 ​

php
public function isActive() : bool

isLoadedFromSave() 5.46.0 ​

php
public function isLoadedFromSave() : bool

readSaveData() ​

php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

setActive() 5.46.0 ​

php
public function setActive(bool $active) : void

setLastUpdateTick() 5.46.0 ​

php
public function setLastUpdateTick(int $lastUpdateTick) : void

setLoadedFromSave() 5.46.0 ​

php
public function setLoadedFromSave(bool $loadedFromSave) : void

setPrimaryEffect() ​

php
public function setPrimaryEffect(int $primaryEffect) : void

setPyramidLevel() 5.46.0 ​

php
public function setPyramidLevel(int $pyramidLevel) : void

setSecondaryEffect() ​

php
public function setSecondaryEffect(int $secondaryEffect) : void

writeSaveData() protected ​

php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

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