Added Carpet bounding box

This commit is contained in:
Shoghi Cervantes 2014-08-30 02:09:15 +02:00
parent d4907a2688
commit c774e4c203

View File

@ -23,6 +23,7 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\level\Level;
use pocketmine\math\AxisAlignedBB;
use pocketmine\Player;
class Carpet extends Flowable{
@ -52,6 +53,17 @@ class Carpet extends Flowable{
$this->isSolid = true;
}
public function getBoundingBox(){
return new AxisAlignedBB(
$this->x,
$this->y,
$this->z,
$this->x + 1,
$this->y + 0.0625,
$this->z + 1
);
}
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
$down = $this->getSide(0);
if($down->getID() !== self::AIR){