Fixed projectiles collding with spectator players

closes #1857
This commit is contained in:
Dylan K. Taylor
2018-01-17 10:57:04 +00:00
parent 9c65a2b890
commit 6f6e3aaa21
3 changed files with 9 additions and 1 deletions

View File

@ -1964,7 +1964,7 @@ class Level implements ChunkManager, Metadatable{
for($z = $minZ; $z <= $maxZ; ++$z){
foreach($this->getChunkEntities($x, $z) as $ent){
/** @var Entity|null $entity */
if(($entity === null or ($ent !== $entity and $entity->canCollideWith($ent))) and $ent->boundingBox->intersectsWith($bb)){
if($ent->canBeCollidedWith() and ($entity === null or ($ent !== $entity and $entity->canCollideWith($ent))) and $ent->boundingBox->intersectsWith($bb)){
$nearby[] = $ent;
}
}