mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fixed Level->getCollidingEntities() when called with a null Entity
This commit is contained in:
parent
de11cce154
commit
35de331b74
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user