Skip to content

PressurePlate ​

abstract class · pocketmine\block\PressurePlate · source

Extends Transparent

Methods ​

__construct() ​

php
public function __construct(\pocketmine\block\BlockIdentifier $idInfo, string $name, \pocketmine\block\BlockTypeInfo $typeInfo, int $deactivationDelayTicks = 20)

calculatePlateState() protected ​

php
protected function calculatePlateState(array $entities) : array

TODO: make this abstract in PM6

filterIrrelevantEntities() protected ​

php
protected function filterIrrelevantEntities(array $entities) : array

Filters entities which don't affect the pressure plate state from the given list.

getActivationBox() protected ​

php
protected function getActivationBox() : \pocketmine\math\AxisAlignedBB

Returns the AABB that entities must intersect to activate the pressure plate. Note that this is not the same as the collision box (pressure plate doesn't have one), nor the visual bounding box. The activation area has a height of 0.25 blocks.

getOutputPower() 5.46.0 protected ​

php
protected function getOutputPower() : int

Returns the redstone power emitted by the plate in its current state.

getStrongPower() 5.46.0 ​

php
public function getStrongPower(int $face) : int

getSupportType() ​

php
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportType

getWeakPower() 5.46.0 ​

php
public function getWeakPower(int $face) : int

hasEntityCollision() ​

php
public function hasEntityCollision() : bool

hasOutputSignal() protected ​

php
protected function hasOutputSignal() : bool

TODO: make this abstract in PM6

isRedstoneSource() 5.46.0 ​

php
public function isRedstoneSource() : bool

isSolid() ​

php
public function isSolid() : bool

onBreak() 5.46.0 ​

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

onEntityInside() ​

php
public function onEntityInside(\pocketmine\entity\Entity $entity) : bool

onScheduledUpdate() ​

php
public function onScheduledUpdate() : void

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.