mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
This commit is contained in:
@ -39,7 +39,7 @@ class Note extends Opaque{
|
||||
|
||||
public function readStateFromWorld() : void{
|
||||
parent::readStateFromWorld();
|
||||
$tile = $this->pos->getWorld()->getTile($this->pos);
|
||||
$tile = $this->pos->getWorldNonNull()->getTile($this->pos);
|
||||
if($tile instanceof TileNote){
|
||||
$this->pitch = $tile->getPitch();
|
||||
}else{
|
||||
@ -49,7 +49,7 @@ class Note extends Opaque{
|
||||
|
||||
public function writeStateToWorld() : void{
|
||||
parent::writeStateToWorld();
|
||||
$tile = $this->pos->getWorld()->getTile($this->pos);
|
||||
$tile = $this->pos->getWorldNonNull()->getTile($this->pos);
|
||||
assert($tile instanceof TileNote);
|
||||
$tile->setPitch($this->pitch);
|
||||
}
|
||||
|
Reference in New Issue
Block a user