mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Eradicate remaining usages of public Position->world field
and as an added bonus, ditch a bunch of extra phpstan errors
This commit is contained in:
@ -47,9 +47,9 @@ trait FallableTrait{
|
||||
|
||||
public function onNearbyBlockChange() : void{
|
||||
$pos = $this->getPos();
|
||||
$down = $pos->world->getBlock($pos->getSide(Facing::DOWN));
|
||||
$down = $pos->getWorldNonNull()->getBlock($pos->getSide(Facing::DOWN));
|
||||
if($down->getId() === BlockLegacyIds::AIR or $down instanceof Liquid or $down instanceof Fire){
|
||||
$pos->world->setBlock($pos, VanillaBlocks::AIR());
|
||||
$pos->getWorldNonNull()->setBlock($pos, VanillaBlocks::AIR());
|
||||
|
||||
$nbt = EntityFactory::createBaseNBT($pos->add(0.5, 0, 0.5));
|
||||
$nbt->setInt("TileID", $this->getId());
|
||||
|
Reference in New Issue
Block a user