Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'

This commit is contained in:
Dylan K. Taylor
2020-04-18 17:33:05 +01:00
76 changed files with 286 additions and 238 deletions

View File

@ -255,7 +255,7 @@ abstract class BaseRail extends Flowable{
if(isset($otherPossible[$otherSide])){
$otherConnections[] = $otherSide;
$other->setConnections($otherConnections);
$this->pos->getWorld()->setBlock($other->pos, $other);
$this->pos->getWorldNonNull()->setBlock($other->pos, $other);
$changed = true;
$thisConnections[] = $thisSide;
@ -268,7 +268,7 @@ abstract class BaseRail extends Flowable{
if($changed){
$this->setConnections($thisConnections);
$this->pos->getWorld()->setBlock($this->pos, $this);
$this->pos->getWorldNonNull()->setBlock($this->pos, $this);
}
}
@ -287,11 +287,11 @@ abstract class BaseRail extends Flowable{
public function onNearbyBlockChange() : void{
if($this->getSide(Facing::DOWN)->isTransparent()){
$this->pos->getWorld()->useBreakOn($this->pos);
$this->pos->getWorldNonNull()->useBreakOn($this->pos);
}else{
foreach($this->connections as $connection){
if(($connection & self::FLAG_ASCEND) !== 0 and $this->getSide($connection & ~self::FLAG_ASCEND)->isTransparent()){
$this->pos->getWorld()->useBreakOn($this->pos);
$this->pos->getWorldNonNull()->useBreakOn($this->pos);
break;
}
}