mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Added basic support for blocks with multiple AABBs, fixed stairs (#1303)
This commit is contained in:
@ -1497,9 +1497,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
public function isInsideOfSolid() : bool{
|
||||
$block = $this->level->getBlock($this->temporalVector->setComponents(Math::floorFloat($this->x), Math::floorFloat($y = ($this->y + $this->getEyeHeight())), Math::floorFloat($this->z)));
|
||||
|
||||
$bb = $block->getBoundingBox();
|
||||
|
||||
return $bb !== null and $block->isSolid() and !$block->isTransparent() and $bb->intersectsWith($this->getBoundingBox());
|
||||
return $block->isSolid() and !$block->isTransparent() and $block->collidesWithBB($this->getBoundingBox());
|
||||
}
|
||||
|
||||
public function fastMove(float $dx, float $dy, float $dz) : bool{
|
||||
|
Reference in New Issue
Block a user