Skip to content

Conduit 5.46.0 ​

class · pocketmine\block\tile\Conduit · source

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

broadcastState() ​

php
public function broadcastState() : void

Sends the current state (active, target) to the players who can see the conduit.

getFrameBlocks() ​

php
public function getFrameBlocks() : int

getLastUpdateTick() ​

php
public function getLastUpdateTick() : int

getNextAmbientShortTick() ​

php
public function getNextAmbientShortTick() : int

getTargetId() ​

php
public function getTargetId() : int

Returns the ID of the hostile mob being attacked, or -1 if none.

isActive() ​

php
public function isActive() : bool

readSaveData() ​

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

setActive() ​

php
public function setActive(bool $active) : void

setFrameBlocks() ​

php
public function setFrameBlocks(int $frameBlocks) : void

setLastUpdateTick() ​

php
public function setLastUpdateTick(int $lastUpdateTick) : void

setNextAmbientShortTick() ​

php
public function setNextAmbientShortTick(int $tick) : void

setTargetId() ​

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