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

@ -61,7 +61,7 @@ class FlowerPot extends Flowable{
public function readStateFromWorld() : void{
parent::readStateFromWorld();
$tile = $this->pos->getWorld()->getTile($this->pos);
$tile = $this->pos->getWorldNonNull()->getTile($this->pos);
if($tile instanceof TileFlowerPot){
$this->setPlant($tile->getPlant());
}else{
@ -72,7 +72,7 @@ class FlowerPot extends Flowable{
public function writeStateToWorld() : void{
parent::writeStateToWorld();
$tile = $this->pos->getWorld()->getTile($this->pos);
$tile = $this->pos->getWorldNonNull()->getTile($this->pos);
assert($tile instanceof TileFlowerPot);
$tile->setPlant($this->plant);
}
@ -122,7 +122,7 @@ class FlowerPot extends Flowable{
public function onNearbyBlockChange() : void{
if($this->getSide(Facing::DOWN)->isTransparent()){
$this->pos->getWorld()->useBreakOn($this->pos);
$this->pos->getWorldNonNull()->useBreakOn($this->pos);
}
}
@ -134,7 +134,7 @@ class FlowerPot extends Flowable{
$this->setPlant($plant);
$item->pop();
$this->pos->getWorld()->setBlock($this->pos, $this);
$this->pos->getWorldNonNull()->setBlock($this->pos, $this);
return true;
}