mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Implemented Vector3 List and AxisAlignedBB Pool to decrease object allocation
This commit is contained in:
@ -30,9 +30,6 @@ abstract class Thin extends Transparent{
|
||||
public $isSolid = false;
|
||||
|
||||
public function getBoundingBox(){
|
||||
if($this->boundingBox !== null){
|
||||
return $this->boundingBox;
|
||||
}
|
||||
|
||||
$f = 0.4375;
|
||||
$f1 = 0.5625;
|
||||
@ -66,7 +63,7 @@ abstract class Thin extends Transparent{
|
||||
$f3 = 1;
|
||||
}
|
||||
|
||||
return $this->boundingBox = new AxisAlignedBB(
|
||||
return AxisAlignedBB::getBoundingBoxFromPool(
|
||||
$this->x + $f,
|
||||
$this->y,
|
||||
$this->z + $f2,
|
||||
|
Reference in New Issue
Block a user