mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +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,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());
|
||||
|
Reference in New Issue
Block a user