Position: rename getWorldNonNull() to getWorld(), remove original getWorld()

This commit is contained in:
Dylan K. Taylor
2020-06-29 21:19:46 +01:00
parent fc22fd80d8
commit 670ad9eb9d
81 changed files with 259 additions and 275 deletions

View File

@ -255,7 +255,7 @@ abstract class BaseRail extends Flowable{
if(isset($otherPossible[$otherSide])){
$otherConnections[] = $otherSide;
$other->setConnections($otherConnections);
$this->pos->getWorldNonNull()->setBlock($other->pos, $other);
$this->pos->getWorld()->setBlock($other->pos, $other);
$changed = true;
$thisConnections[] = $thisSide;
@ -268,7 +268,7 @@ abstract class BaseRail extends Flowable{
if($changed){
$this->setConnections($thisConnections);
$this->pos->getWorldNonNull()->setBlock($this->pos, $this);
$this->pos->getWorld()->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->getWorldNonNull()->useBreakOn($this->pos);
$this->pos->getWorld()->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->getWorldNonNull()->useBreakOn($this->pos);
$this->pos->getWorld()->useBreakOn($this->pos);
break;
}
}