Skip to content

Stair ​

class · pocketmine\block\Stair · source

Extends Transparent
Implements HorizontalFacing

Properties ​

$shape protected ​

php
protected \pocketmine\block\utils\StairShape $shape

$upsideDown protected ​

php
protected bool $upsideDown

Methods ​

describeBlockOnlyState() protected ​

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

Since 1.26.50 the stair shape is a real block state (minecraft:corner) which the client no longer computes from the neighbours, so it's part of our state too and gets recomputed on block changes.

getShape() ​

php
public function getShape() : \pocketmine\block\utils\StairShape

getSupportType() ​

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

isUpsideDown() ​

php
public function isUpsideDown() : bool

onNearbyBlockChange() 5.46.0 ​

php
public function onNearbyBlockChange() : 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

recalculateShape() 5.46.0 protected ​

php
protected function recalculateShape() : bool

Recomputes the shape from the neighbouring stairs. Returns true if it changed.

setShape() ​

php
public function setShape(\pocketmine\block\utils\StairShape $shape) : self

setUpsideDown() ​

php
public function setUpsideDown(bool $upsideDown) : self

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