Skip to content

Fallable ​

interface · pocketmine\block\utils\Fallable · source

Methods ​

getFallDamagePerBlock() ​

php
public function getFallDamagePerBlock() : float

Returns the damage caused per fallen block. This is multiplied by the fall distance (and capped according to Fallable::getMaxFallDamage()) to calculate the damage dealt to any entities who intersect with the block when it hits the ground.

getLandSound() ​

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

Returns the sound that will be played when FallingBlock hits the ground.

getMaxFallDamage() ​

php
public function getMaxFallDamage() : float

Returns the maximum damage the block can deal to an entity when it hits the ground.

onHitGround() ​

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

Called when FallingBlock hits the ground. Returns whether the block should be placed.

tickFalling() ​

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

Called every tick by FallingBlock to update the falling state of this block. Used by concrete to check when it hits water. Return null if you don't want to change the usual behaviour.

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