Skip to content

LightningRod ​

final class · pocketmine\block\LightningRod · source

Extends Transparent
Implements AnyFacing, CopperMaterial

Constants ​

STRUCK_POWER_TICKS 5.46.0 ​

php
public const STRUCK_POWER_TICKS = 8

How long the rod stays powered after a strike.

Methods ​

describeBlockOnlyState() 5.46.0 protected ​

php
protected function describeBlockOnlyState(\pocketmine\data\runtime\RuntimeDataDescriber $w) : void

getStrongPower() 5.46.0 ​

php
public function getStrongPower(int $face) : int

getWeakPower() 5.46.0 ​

php
public function getWeakPower(int $face) : int

isRedstoneSource() 5.46.0 ​

php
public function isRedstoneSource() : bool

onBreak() 5.46.0 ​

php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onLightningStrike() 5.46.0 ​

php
public function onLightningStrike() : void

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

onScheduledUpdate() 5.46.0 ​

php
public function onScheduledUpdate() : void

place() ​

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

recalculateCollisionBoxes() protected ​

php
protected function recalculateCollisionBoxes() : array

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.