LightningRod
Extends Transparent
Implements AnyFacing, CopperMaterial
Constants
STRUCK_POWER_TICKS 5.46.0
php
public const STRUCK_POWER_TICKS = 8How long the rod stays powered after a strike.
Methods
describeBlockOnlyState() 5.46.0 protected
php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : voidgetStrongPower() 5.46.0
php
public function getStrongPower(int $face) : intgetWeakPower() 5.46.0
php
public function getWeakPower(int $face) : intisRedstoneSource() 5.46.0
php
public function isRedstoneSource() : boolonBreak() 5.46.0
php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonLightningStrike() 5.46.0
php
public function onLightningStrike() : voidCalled when lightning strikes the rod (see \pocketmine\entity\object\LightningBolt): emits a redstone signal of 15 for LightningRod::STRUCK_POWER_TICKS. Rods at the top of their column attract natural strikes (see \pocketmine\world\weather\Weather::findLightningRod()).
onNearbyBlockChange() 5.46.0
php
public function onNearbyBlockChange() : voidonScheduledUpdate() 5.46.0
php
public function onScheduledUpdate() : voidplace()
php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : boolrecalculateCollisionBoxes() protected
php
protected function recalculateCollisionBoxes() : array