mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Block->getBoundingBox() and Block->getCollisionBoxes() are now final
Force usage of Block->recalculateBoundingBox() and Block->recalculateCollisionBoxes()
This commit is contained in:
@ -671,7 +671,7 @@ class Block{
|
||||
/**
|
||||
* @return AxisAlignedBB[]
|
||||
*/
|
||||
public function getCollisionBoxes() : array{
|
||||
final public function getCollisionBoxes() : array{
|
||||
if($this->collisionBoxes === null){
|
||||
$this->collisionBoxes = $this->recalculateCollisionBoxes();
|
||||
foreach($this->collisionBoxes as $bb){
|
||||
@ -696,7 +696,7 @@ class Block{
|
||||
/**
|
||||
* @return AxisAlignedBB|null
|
||||
*/
|
||||
public function getBoundingBox() : ?AxisAlignedBB{
|
||||
final public function getBoundingBox() : ?AxisAlignedBB{
|
||||
if($this->boundingBox === null){
|
||||
$this->boundingBox = $this->recalculateBoundingBox();
|
||||
if($this->boundingBox !== null){
|
||||
|
Reference in New Issue
Block a user