mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Save block bounding boxes, improves block cache
This commit is contained in:
@ -38,6 +38,10 @@ class Trapdoor extends Transparent{
|
||||
}
|
||||
|
||||
public function getBoundingBox(){
|
||||
if($this->boundingBox !== null){
|
||||
return $this->boundingBox;
|
||||
}
|
||||
|
||||
$damage = $this->getDamage();
|
||||
|
||||
$f = 0.1875;
|
||||
@ -104,7 +108,7 @@ class Trapdoor extends Transparent{
|
||||
}
|
||||
}
|
||||
|
||||
return $bb;
|
||||
return $this->boundingBox = $bb;
|
||||
}
|
||||
|
||||
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
||||
|
Reference in New Issue
Block a user