Bell
Extends Spawnable
Constants
TAG_DIRECTION
php
public const TAG_DIRECTION = "Direction"TAG_RINGING
php
public const TAG_RINGING = "Ringing"TAG_TICKS
php
public const TAG_TICKS = "Ticks"Methods
addAdditionalSpawnData() protected
php
protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidcreateFakeUpdatePacket()
php
public function createFakeUpdatePacket(int $bellHitFace) : \pocketmine\network\mcpe\protocol\BlockActorDataPacketTODO: HACK! Creates a BlockActorDataPacket that triggers the ringing animation on a bell block.
Bedrock team overcomplicated making bells ring when they implemented this; this would have been better and much simpler as a BlockEventPacket. It's simpler to implement bells with this hack than to follow Mojang's complicated mess.
getFacing()
php
public function getFacing() : intgetTicks()
php
public function getTicks() : intisRinging()
php
public function isRinging() : boolreadSaveData()
php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidsetFacing()
php
public function setFacing(int $facing) : voidsetRinging()
php
public function setRinging(bool $ringing) : voidsetTicks()
php
public function setTicks(int $ticks) : voidwriteSaveData() protected
php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void