mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +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:
@ -41,7 +41,7 @@ abstract class Stem extends Crops{
|
||||
$ev = new BlockGrowEvent($this, $block);
|
||||
$ev->call();
|
||||
if(!$ev->isCancelled()){
|
||||
$this->pos->getWorld()->setBlock($this->pos, $ev->getNewState());
|
||||
$this->position->getWorld()->setBlock($this->position, $ev->getNewState());
|
||||
}
|
||||
}else{
|
||||
$grow = $this->getPlant();
|
||||
@ -57,7 +57,7 @@ abstract class Stem extends Crops{
|
||||
$ev = new BlockGrowEvent($side, $grow);
|
||||
$ev->call();
|
||||
if(!$ev->isCancelled()){
|
||||
$this->pos->getWorld()->setBlock($side->pos, $ev->getNewState());
|
||||
$this->position->getWorld()->setBlock($side->position, $ev->getNewState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user