mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +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($x = $minX; $x <= $maxX; ++$x){
|
||||||
for($y = $minY; $y <= $maxY; ++$y){
|
for($y = $minY; $y <= $maxY; ++$y){
|
||||||
$block = $this->getBlockAt($x, $y, $z);
|
$block = $this->getBlockAt($x, $y, $z);
|
||||||
if($block->getId() !== 0 and $block->collidesWithBB($bb)){
|
if(!$block->canPassThrough() and $block->collidesWithBB($bb)){
|
||||||
return [$block];
|
return [$block];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1124,7 +1124,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
for($x = $minX; $x <= $maxX; ++$x){
|
for($x = $minX; $x <= $maxX; ++$x){
|
||||||
for($y = $minY; $y <= $maxY; ++$y){
|
for($y = $minY; $y <= $maxY; ++$y){
|
||||||
$block = $this->getBlockAt($x, $y, $z);
|
$block = $this->getBlockAt($x, $y, $z);
|
||||||
if($block->getId() !== 0 and $block->collidesWithBB($bb)){
|
if(!$block->canPassThrough() and $block->collidesWithBB($bb)){
|
||||||
$collides[] = $block;
|
$collides[] = $block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user