mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Added some new blocks, fixed collisions not being detected when standing on top of a full block
This commit is contained in:
@ -1611,12 +1611,13 @@ abstract class Entity extends Location implements Metadatable{
|
||||
*/
|
||||
public function getBlocksAround() : array{
|
||||
if($this->blocksAround === null){
|
||||
$minX = Math::floorFloat($this->boundingBox->minX);
|
||||
$minY = Math::floorFloat($this->boundingBox->minY);
|
||||
$minZ = Math::floorFloat($this->boundingBox->minZ);
|
||||
$maxX = Math::ceilFloat($this->boundingBox->maxX);
|
||||
$maxY = Math::ceilFloat($this->boundingBox->maxY);
|
||||
$maxZ = Math::ceilFloat($this->boundingBox->maxZ);
|
||||
$bb = $this->boundingBox->grow(0.01, 0.01, 0.01);
|
||||
$minX = Math::floorFloat($bb->minX);
|
||||
$minY = Math::floorFloat($bb->minY);
|
||||
$minZ = Math::floorFloat($bb->minZ);
|
||||
$maxX = Math::ceilFloat($bb->maxX);
|
||||
$maxY = Math::ceilFloat($bb->maxY);
|
||||
$maxZ = Math::ceilFloat($bb->maxZ);
|
||||
|
||||
$this->blocksAround = [];
|
||||
|
||||
|
Reference in New Issue
Block a user