Added cactus bounding box

This commit is contained in:
Shoghi Cervantes 2014-08-30 23:06:27 +02:00
parent 910e5e6181
commit 3bf39df255

View File

@ -23,6 +23,7 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\level\Level;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3 as Vector3;
use pocketmine\Player;
@ -33,6 +34,17 @@ class Cactus extends Transparent{
$this->hardness = 2;
}
public function getBoundingBox(){
return new AxisAlignedBB(
$this->x + 0.0625,
$this->y,
$this->z + 0.0625,
$this->x + 0.9375,
$this->y + 1,
$this->z + 0.9375
);
}
public function onUpdate($type){
if($type === Level::BLOCK_UPDATE_NORMAL){
$down = $this->getSide(0);