Skip to content

Scaffolding 5.46.0 ​

class · pocketmine\block\Scaffolding · source

Extends Transparent
Implements Fallable

Scaffolding, with the Bedrock rules.

Its stability is the horizontal distance to a scaffolding column standing on a block with a full top face: 0 on such a block, the same as the scaffolding below it, otherwise the lowest horizontal neighbour + 1. 7 means that it is unsupported:

  • scaffolding that was never supported (placed more than 6 blocks out, or in mid-air) falls like sand, and lands as scaffolding where it can stand (otherwise it drops as an item);
  • scaffolding that loses its support breaks and drops itself, so removing the bottom of a column, or the column holding an overhang, takes down everything that depended on it, one block per tick.

Placement (Bedrock): scaffolding goes against the clicked face like any other block (the client picks the face from where the player looks, also from inside scaffolding), except that placing it into scaffolding, or against the bottom face of scaffolding, puts it on top of that scaffolding column. Entities don't stop it from being placed. Climbing, walking through it and sneaking down are handled by the client; only the top planks collide.

Constants ​

MAX_STABILITY ​

php
public const MAX_STABILITY = 7

Methods ​

calculateStability() ​

php
public static function calculateStability(\pocketmine\world\World $world, \pocketmine\math\Vector3 $pos) : int

Returns the stability scaffolding would have at the given position.

canBePlacedAt() ​

php
public function canBePlacedAt(\pocketmine\block\Block $blockReplace, \pocketmine\math\Vector3 $clickVector, int $face, bool $isClickedBlock) : bool

canClimb() ​

php
public function canClimb() : bool

describeBlockOnlyState() protected ​

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

getFallDamagePerBlock() ​

php
public function getFallDamagePerBlock() : float

getFlameEncouragement() ​

php
public function getFlameEncouragement() : int

getFlammability() ​

php
public function getFlammability() : int

getLandSound() ​

php
public function getLandSound() : ?\pocketmine\world\sound\Sound

getMaxFallDamage() ​

php
public function getMaxFallDamage() : float

getStability() ​

php
public function getStability() : int

getSupportType() ​

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

hasEntityCollision() ​

php
public function hasEntityCollision() : bool

isPlacementObstructedByEntities() ​

php
public function isPlacementObstructedByEntities() : bool

isStabilityCheck() ​

php
public function isStabilityCheck() : bool

Vanilla "stability_check" state: set on scaffolding placed by a player until its stability has been checked, one tick later. Whether unsupported scaffolding falls or breaks depends on its stored stability, not on this.

onEntityInside() ​

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

onHitGround() ​

php
public function onHitGround(\pocketmine\entity\object\FallingBlock $blockEntity) : bool

onNearbyBlockChange() ​

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

setStability() ​

php
public function setStability(int $stability) : self

setStabilityCheck() ​

php
public function setStabilityCheck(bool $stabilityCheck) : self

tickFalling() ​

php
public function tickFalling() : ?\pocketmine\block\Block

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