22declare(strict_types=1);
24namespace pocketmine\block\utils;
42 abstract protected function getPosition() : Position;
44 public function onNearbyBlockChange() : void{
46 $world = $pos->getWorld();
47 $down = $world->getBlock($pos->getSide(Facing::DOWN));
48 if($down->canBeReplaced()){
49 $world->setBlock($pos, VanillaBlocks::AIR());
52 if(!($block instanceof Block)) throw new AssumptionFailedError(__TRAIT__ .
" should only be used by Blocks");
54 $fall = new FallingBlock(Location::fromObject($pos->add(0.5, 0, 0.5), $world), $block);
59 public function tickFalling() : ?Block{
63 public function onHitGround(FallingBlock $blockEntity) : bool{
67 public function getFallDamagePerBlock() : float{
71 public function getMaxFallDamage() : float{
75 public function getLandSound() : ?Sound{