fix possible crash in Projectile

This commit is contained in:
Dylan K. Taylor 2019-02-03 13:36:35 +00:00
parent 537afbc23b
commit acd0a8f2d4

View File

@ -165,7 +165,7 @@ abstract class Projectile extends Entity{
} }
public function onNearbyBlockChange() : void{ 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; $this->blockHit = null;
} }