From 35de331b743c789f4f1cdaf9ae981b3add27c7b0 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 6 Oct 2014 13:18:05 +0200 Subject: [PATCH] Fixed Level->getCollidingEntities() when called with a null Entity --- src/pocketmine/level/Level.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index fe2bd908c..b1af6dfed 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1248,7 +1248,7 @@ class Level implements ChunkManager, Metadatable{ public function getCollidingEntities(AxisAlignedBB $bb, Entity $entity = null){ $nearby = []; - if($entity->canCollide){ + if($entity === null or $entity->canCollide){ $minX = Math::floorFloat(($bb->minX - 2) / 16); $maxX = Math::floorFloat(($bb->maxX - 2) / 16); $minZ = Math::floorFloat(($bb->minZ - 2) / 16);