mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-27 13:49:55 +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{
|
class Wall extends Transparent{
|
||||||
|
|
||||||
/** @var bool[] facing => dummy */
|
/** @var int[] facing => facing */
|
||||||
protected $connections = [];
|
protected $connections = [];
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
protected $up = false;
|
protected $up = false;
|
||||||
@ -44,7 +44,7 @@ class Wall extends Transparent{
|
|||||||
foreach(Facing::HORIZONTAL as $facing){
|
foreach(Facing::HORIZONTAL as $facing){
|
||||||
$block = $this->getSide($facing);
|
$block = $this->getSide($facing);
|
||||||
if($block instanceof static or $block instanceof FenceGate or ($block->isSolid() and !$block->isTransparent())){
|
if($block instanceof static or $block instanceof FenceGate or ($block->isSolid() and !$block->isTransparent())){
|
||||||
$this->connections[$facing] = true;
|
$this->connections[$facing] = $facing;
|
||||||
}else{
|
}else{
|
||||||
unset($this->connections[$facing]);
|
unset($this->connections[$facing]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user