mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Level: fixed logic of getCollisionBlocks() to match getCollisionCubes()
This commit is contained in:
parent
74c0863905
commit
0a9ed059d6
@ -1113,7 +1113,7 @@ 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->getId() !== 0 and $block->collidesWithBB($bb)){
|
||||
if(!$block->canPassThrough() and $block->collidesWithBB($bb)){
|
||||
return [$block];
|
||||
}
|
||||
}
|
||||
@ -1124,7 +1124,7 @@ 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->getId() !== 0 and $block->collidesWithBB($bb)){
|
||||
if(!$block->canPassThrough() and $block->collidesWithBB($bb)){
|
||||
$collides[] = $block;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user