pocketmine\block\FenceGate::recalculateBoundingBox PHP Method

recalculateBoundingBox() protected method

protected recalculateBoundingBox ( )
    protected function recalculateBoundingBox()
    {
        if (($this->getDamage() & 0x4) > 0) {
            return null;
        }
        $i = $this->getDamage() & 0x3;
        if ($i === 2 or $i === 0) {
            return new AxisAlignedBB($this->x, $this->y, $this->z + 0.375, $this->x + 1, $this->y + 1.5, $this->z + 0.625);
        } else {
            return new AxisAlignedBB($this->x + 0.375, $this->y, $this->z, $this->x + 0.625, $this->y + 1.5, $this->z + 1);
        }
    }