Skip to content

Commit 0a29e66

Browse files
committed
Fixed #2114 Removed Player collisions with other entities
1 parent 3cc4afb commit 0a29e66

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/pocketmine/Player.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ public function showPlayer(Player $player){
296296
}
297297
}
298298

299+
public function canCollideWith(Entity $entity){
300+
return false;
301+
}
302+
299303
/**
300304
* @return bool
301305
*/

src/pocketmine/entity/Arrow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function onUpdate(){
8585
$nearEntity = null;
8686

8787
foreach($list as $entity){
88-
if(!$entity->canCollideWith($this) or ($entity === $this->shootingEntity and $this->ticksLived < 5)){
88+
if(/*!$entity->canCollideWith($this) or */($entity === $this->shootingEntity and $this->ticksLived < 5)){
8989
continue;
9090
}
9191

src/pocketmine/level/Level.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ public function getCollidingEntities(AxisAlignedBB $bb, Entity $entity = null){
12301230
for($x = $minX; $x <= $maxX; ++$x){
12311231
for($z = $minZ; $z <= $maxZ; ++$z){
12321232
foreach($this->getChunkEntities($x, $z) as $ent){
1233-
if($ent !== $entity and ($entity === null or ($ent->canCollideWith($entity) and $entity->canCollideWith($ent))) and $ent->boundingBox->intersectsWith($bb)){
1233+
if($ent !== $entity and ($entity === null or $entity->canCollideWith($ent)) and $ent->boundingBox->intersectsWith($bb)){
12341234
$nearby[] = $ent;
12351235
}
12361236
}

0 commit comments

Comments
 (0)