Skip to content

Hopper ​

class · pocketmine\block\Hopper · source

Extends Transparent
Implements PoweredByRedstone

Methods ​

describeBlockOnlyState() protected ​

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

getCollectionArea() 5.46.0 ​

php
public function getCollectionArea() : \pocketmine\math\AxisAlignedBB

Area in which item entities are collected: the bowl and the whole block space above the hopper.

getFacing() ​

php
public function getFacing() : int

getSupportType() ​

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

onInteract() ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onNearbyBlockChange() 5.46.0 ​

php
public function onNearbyBlockChange() : void

A powered hopper is locked (toggle_bit).

onPostPlace() 5.46.0 ​

php
public function onPostPlace() : void

onScheduledUpdate() ​

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

setFacing() ​

php
public function setFacing(int $facing) : self

wakeUp() 5.46.0 ​

php
public function wakeUp() : void

Schedules a transfer attempt as soon as the cooldown allows. Hoppers are not ticked while idle: they are woken up when an inventory they use changes, when an item lands above them, when a neighbour changes or when they are unlocked.

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