Fixed Level->getCollidingEntities() when called with a null Entity

This commit is contained in:
Shoghi Cervantes 2014-10-06 13:18:05 +02:00
parent de11cce154
commit 35de331b74

View File

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