PressurePlate
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) : arrayTODO: make this abstract in PM6
filterIrrelevantEntities() protected
php
protected function filterIrrelevantEntities(array $entities) : arrayFilters entities which don't affect the pressure plate state from the given list.
getActivationBox() protected
php
protected function getActivationBox() : \pocketmine\math\AxisAlignedBBReturns 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() : intReturns the redstone power emitted by the plate in its current state.
getStrongPower() 5.46.0
php
public function getStrongPower(int $face) : intgetSupportType()
php
public function getSupportType(int $facing) : \pocketmine\block\utils\SupportTypegetWeakPower() 5.46.0
php
public function getWeakPower(int $face) : inthasEntityCollision()
php
public function hasEntityCollision() : boolhasOutputSignal() protected
php
protected function hasOutputSignal() : boolTODO: make this abstract in PM6
isRedstoneSource() 5.46.0
php
public function isRedstoneSource() : boolisSolid()
php
public function isSolid() : boolonBreak() 5.46.0
php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonEntityInside()
php
public function onEntityInside(\pocketmine\entity\Entity $entity) : boolonScheduledUpdate()
php
public function onScheduledUpdate() : voidrecalculateCollisionBoxes() protected
php
protected function recalculateCollisionBoxes() : array