mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
Refactor Block & Tile: getPos() to getPosition() (#4395)
this also changes the name of the class property 'pos' to 'position' as well as Block->getPosOffset() to Block->getPositionOffset()
This commit is contained in:
@ -34,7 +34,7 @@ class Note extends Opaque{
|
||||
|
||||
public function readStateFromWorld() : void{
|
||||
parent::readStateFromWorld();
|
||||
$tile = $this->pos->getWorld()->getTile($this->pos);
|
||||
$tile = $this->position->getWorld()->getTile($this->position);
|
||||
if($tile instanceof TileNote){
|
||||
$this->pitch = $tile->getPitch();
|
||||
}else{
|
||||
@ -44,7 +44,7 @@ class Note extends Opaque{
|
||||
|
||||
public function writeStateToWorld() : void{
|
||||
parent::writeStateToWorld();
|
||||
$tile = $this->pos->getWorld()->getTile($this->pos);
|
||||
$tile = $this->position->getWorld()->getTile($this->position);
|
||||
assert($tile instanceof TileNote);
|
||||
$tile->setPitch($this->pitch);
|
||||
}
|
||||
|
Reference in New Issue
Block a user