Conduit 5.46.0
Extends Spawnable
Block entity of a conduit. The client animates the conduit from it: "Active" (TAG_Byte) makes the eye open and spin, "Target" (TAG_Long, the actor unique ID of the hostile mob being attacked, -1 for none) draws the attack particles (same tags as PowerNukkitX's BlockEntityConduit).
The frame is recomputed every 40 ticks by \pocketmine\block\Conduit, so the runtime fields below are not saved, except "Active" which is kept so that a reloaded conduit doesn't play its activation sound again.
Methods
addAdditionalSpawnData() protected
php
protected function addAdditionalSpawnData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidbroadcastState()
php
public function broadcastState() : voidSends the current state (active, target) to the players who can see the conduit.
getFrameBlocks()
php
public function getFrameBlocks() : intgetLastUpdateTick()
php
public function getLastUpdateTick() : intgetNextAmbientShortTick()
php
public function getNextAmbientShortTick() : intgetTargetId()
php
public function getTargetId() : intReturns the ID of the hostile mob being attacked, or -1 if none.
isActive()
php
public function isActive() : boolreadSaveData()
php
public function readSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidsetActive()
php
public function setActive(bool $active) : voidsetFrameBlocks()
php
public function setFrameBlocks(int $frameBlocks) : voidsetLastUpdateTick()
php
public function setLastUpdateTick(int $lastUpdateTick) : voidsetNextAmbientShortTick()
php
public function setNextAmbientShortTick(int $tick) : voidsetTargetId()
php
public function setTargetId(int $targetId) : voidwriteSaveData() protected
php
protected function writeSaveData(\pocketmine\nbt\tag\CompoundTag $nbt) : void