mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 07:25:31 +00:00
Level: fine-tuned getCollisionCubes() a little bit
since we're getting the BBs anyway, what's the point in delegating this job to the block?
This commit is contained in:
parent
0a9ed059d6
commit
71fdd59c4c
@ -1175,9 +1175,11 @@ class Level implements ChunkManager, Metadatable{
|
||||
for($x = $minX; $x <= $maxX; ++$x){
|
||||
for($y = $minY; $y <= $maxY; ++$y){
|
||||
$block = $this->getBlockAt($x, $y, $z);
|
||||
if(!$block->canPassThrough() and $block->collidesWithBB($bb)){
|
||||
if(!$block->canPassThrough()){
|
||||
foreach($block->getCollisionBoxes() as $blockBB){
|
||||
$collides[] = $blockBB;
|
||||
if($blockBB->intersectsWith($bb)){
|
||||
$collides[] = $blockBB;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user