Fixed #2114 Removed Player collisions with other entities

This commit is contained in:
Shoghi Cervantes 2014-09-22 11:26:12 +02:00
parent 3cc4afbcd6
commit 0a29e66b62
3 changed files with 6 additions and 2 deletions

View File

@ -296,6 +296,10 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
}
}
public function canCollideWith(Entity $entity){
return false;
}
/**
* @return bool
*/

View File

@ -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;
}

View File

@ -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;
}
}