diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 57ce56837..10171cec3 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -296,6 +296,10 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ } } + public function canCollideWith(Entity $entity){ + return false; + } + /** * @return bool */ diff --git a/src/pocketmine/entity/Arrow.php b/src/pocketmine/entity/Arrow.php index d0d08fb7a..6a180289f 100644 --- a/src/pocketmine/entity/Arrow.php +++ b/src/pocketmine/entity/Arrow.php @@ -85,7 +85,7 @@ class Arrow extends Projectile{ $nearEntity = null; foreach($list as $entity){ - if(!$entity->canCollideWith($this) or ($entity === $this->shootingEntity and $this->ticksLived < 5)){ + if(/*!$entity->canCollideWith($this) or */($entity === $this->shootingEntity and $this->ticksLived < 5)){ continue; } diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index f9b2d04b7..9bc1b9274 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1230,7 +1230,7 @@ class Level implements ChunkManager, Metadatable{ for($x = $minX; $x <= $maxX; ++$x){ for($z = $minZ; $z <= $maxZ; ++$z){ foreach($this->getChunkEntities($x, $z) as $ent){ - if($ent !== $entity and ($entity === null or ($ent->canCollideWith($entity) and $entity->canCollideWith($ent))) and $ent->boundingBox->intersectsWith($bb)){ + if($ent !== $entity and ($entity === null or $entity->canCollideWith($ent)) and $ent->boundingBox->intersectsWith($bb)){ $nearby[] = $ent; } }