Save block bounding boxes, improves block cache

This commit is contained in:
Shoghi Cervantes
2014-10-13 18:38:00 +02:00
parent 5448a48f67
commit 1eec333501
24 changed files with 113 additions and 39 deletions

View File

@ -54,7 +54,11 @@ class Carpet extends Flowable{
}
public function getBoundingBox(){
return new AxisAlignedBB(
if($this->boundingBox !== null){
return $this->boundingBox;
}
return $this->boundingBox = new AxisAlignedBB(
$this->x,
$this->y,
$this->z,