22declare(strict_types=1);
24namespace pocketmine\block\utils;
34trait StaticSupportTrait{
39 abstract private function canBeSupportedAt(Block $block) : bool;
44 public function canBePlacedAt(Block $blockReplace, Vector3 $clickVector,
Facing $face,
bool $isClickedBlock) : bool{
45 return $this->canBeSupportedAt($blockReplace) && parent::canBePlacedAt($blockReplace, $clickVector, $face, $isClickedBlock);
51 public function onNearbyBlockChange() : void{
52 if(!$this->canBeSupportedAt($this)){
53 $this->position->getWorld()->useBreakOn($this->position);
55 parent::onNearbyBlockChange();