mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 05:40:01 +00:00
Wall: use facing as value as well as key in connections
This commit is contained in:
parent
9e3ff21aea
commit
12087c9850
@ -29,7 +29,7 @@ use pocketmine\math\Facing;
|
||||
|
||||
class Wall extends Transparent{
|
||||
|
||||
/** @var bool[] facing => dummy */
|
||||
/** @var int[] facing => facing */
|
||||
protected $connections = [];
|
||||
/** @var bool */
|
||||
protected $up = false;
|
||||
@ -44,7 +44,7 @@ class Wall extends Transparent{
|
||||
foreach(Facing::HORIZONTAL as $facing){
|
||||
$block = $this->getSide($facing);
|
||||
if($block instanceof static or $block instanceof FenceGate or ($block->isSolid() and !$block->isTransparent())){
|
||||
$this->connections[$facing] = true;
|
||||
$this->connections[$facing] = $facing;
|
||||
}else{
|
||||
unset($this->connections[$facing]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user