22declare(strict_types=1);
26use pocketmine\block\utils\SupportType;
37 protected array $connections = [];
42 $this->collisionBoxes =
null;
44 foreach(Facing::HORIZONTAL as $facing){
45 $side = $this->
getSide($facing);
47 $this->connections[$facing] =
true;
49 unset($this->connections[$facing]);
62 if(isset($this->connections[Facing::WEST]) || isset($this->connections[Facing::EAST])){
65 if(!isset($this->connections[Facing::WEST])){
66 $bb->trim(Facing::WEST, $inset);
67 }elseif(!isset($this->connections[Facing::EAST])){
68 $bb->trim(Facing::EAST, $inset);
73 if(isset($this->connections[Facing::NORTH]) || isset($this->connections[Facing::SOUTH])){
76 if(!isset($this->connections[Facing::NORTH])){
77 $bb->trim(Facing::NORTH, $inset);
78 }elseif(!isset($this->connections[Facing::SOUTH])){
79 $bb->trim(Facing::SOUTH, $inset);
84 if(count($bbs) === 0){
95 return SupportType::NONE;
getSide(int $side, int $step=1)
recalculateCollisionBoxes()
getSupportType(int $facing)
getSupportType(int $facing)
static opposite(int $direction)