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

@ -53,6 +53,10 @@ abstract class Door extends Transparent{
}
public function getBoundingBox(){
if($this->boundingBox !== null){
return $this->boundingBox;
}
$f = 0.1875;
$damage = $this->getFullDamage();
@ -195,7 +199,7 @@ abstract class Door extends Transparent{
}
}
return $bb;
return $this->boundingBox = $bb;
}
public function onUpdate($type){