mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Fixed connection requirements for fences, glass, bars and walls
these connect to the back faces of stairs and to glass, for example.
This commit is contained in:
parent
79acc4fed4
commit
fe94379a93
@ -42,7 +42,7 @@ class Fence extends Transparent{
|
|||||||
|
|
||||||
foreach(Facing::HORIZONTAL as $facing){
|
foreach(Facing::HORIZONTAL as $facing){
|
||||||
$block = $this->getSide($facing);
|
$block = $this->getSide($facing);
|
||||||
if($block instanceof static || $block instanceof FenceGate || ($block->isSolid() && !$block->isTransparent())){
|
if($block instanceof static || $block instanceof FenceGate || $block->getSupportType(Facing::opposite($facing))->equals(SupportType::FULL())){
|
||||||
$this->connections[$facing] = true;
|
$this->connections[$facing] = true;
|
||||||
}else{
|
}else{
|
||||||
unset($this->connections[$facing]);
|
unset($this->connections[$facing]);
|
||||||
|
@ -41,7 +41,7 @@ class Thin extends Transparent{
|
|||||||
|
|
||||||
foreach(Facing::HORIZONTAL as $facing){
|
foreach(Facing::HORIZONTAL as $facing){
|
||||||
$side = $this->getSide($facing);
|
$side = $this->getSide($facing);
|
||||||
if($side instanceof Thin || $side instanceof Wall || $side->isFullCube()){
|
if($side instanceof Thin || $side instanceof Wall || $side->getSupportType(Facing::opposite($facing))->equals(SupportType::FULL())){
|
||||||
$this->connections[$facing] = true;
|
$this->connections[$facing] = true;
|
||||||
}else{
|
}else{
|
||||||
unset($this->connections[$facing]);
|
unset($this->connections[$facing]);
|
||||||
|
@ -101,7 +101,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 || $block instanceof FenceGate || $block instanceof Thin || ($block->isSolid() && !$block->isTransparent())){
|
if($block instanceof static || $block instanceof FenceGate || $block instanceof Thin || $block->getSupportType(Facing::opposite($facing))->equals(SupportType::FULL())){
|
||||||
if(!isset($this->connections[$facing])){
|
if(!isset($this->connections[$facing])){
|
||||||
$this->connections[$facing] = WallConnectionType::SHORT();
|
$this->connections[$facing] = WallConnectionType::SHORT();
|
||||||
$changed++;
|
$changed++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user