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:
SalmonDE
2021-08-23 15:01:32 +02:00
committed by GitHub
parent 22316976fa
commit 7fd712c1ff
93 changed files with 402 additions and 402 deletions

View File

@ -41,14 +41,14 @@ use pocketmine\world\Position;
*/
trait FallableTrait{
abstract protected function getPos() : Position;
abstract protected function getPosition() : Position;
abstract protected function getId() : int;
abstract protected function getMeta() : int;
public function onNearbyBlockChange() : void{
$pos = $this->getPos();
$pos = $this->getPosition();
$down = $pos->getWorld()->getBlock($pos->getSide(Facing::DOWN));
if($down->getId() === BlockLegacyIds::AIR or $down instanceof Liquid or $down instanceof Fire){
$pos->getWorld()->setBlock($pos, VanillaBlocks::AIR());