From acd0a8f2d4cd651bd465a8d9ac9fb50944e8ecfc Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 3 Feb 2019 13:36:35 +0000 Subject: [PATCH] fix possible crash in Projectile --- src/pocketmine/entity/projectile/Projectile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/entity/projectile/Projectile.php b/src/pocketmine/entity/projectile/Projectile.php index 2a1ebb9bf..b6ef1154d 100644 --- a/src/pocketmine/entity/projectile/Projectile.php +++ b/src/pocketmine/entity/projectile/Projectile.php @@ -165,7 +165,7 @@ abstract class Projectile extends Entity{ } public function onNearbyBlockChange() : void{ - if($this->blockHit !== null and !$this->blockHit->isSameState($this->level->getBlock($this->blockHit))){ + if($this->blockHit !== null and $this->level->isInLoadedTerrain($this->blockHit) and !$this->blockHit->isSameState($this->level->getBlock($this->blockHit))){ $this->blockHit = null; }