Skip to content

Bell ​

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

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) : void

createFakeUpdatePacket() ​

php
public function createFakeUpdatePacket(int $bellHitFace) : \pocketmine\network\mcpe\protocol\BlockActorDataPacket

TODO: 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() : int

getTicks() ​

php
public function getTicks() : int

isRinging() ​

php
public function isRinging() : bool

readSaveData() ​

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

setFacing() ​

php
public function setFacing(int $facing) : void

setRinging() ​

php
public function setRinging(bool $ringing) : void

setTicks() ​

php
public function setTicks(int $ticks) : 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.