mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-10 07:49:42 +00:00
fix possible crash in Projectile
This commit is contained in:
parent
537afbc23b
commit
acd0a8f2d4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user