PHP Класс pocketmine\block\Stair

Наследование: extends Transparent
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getDrops ( Item $item ) : array
getHardness ( )
getResistance ( )
place ( Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null )

Защищенные методы

Метод Описание
recalculateBoundingBox ( ) * public function collidesWithBB(AxisAlignedBB $bb, &$list = []){ $damage = $this->getDamage(); $j = $damage & 0x03;

Описание методов

getDrops() публичный Метод

public getDrops ( Item $item ) : array
$item pocketmine\item\Item
Результат array

getHardness() публичный Метод

public getHardness ( )

getResistance() публичный Метод

public getResistance ( )

place() публичный Метод

public place ( Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null )
$item pocketmine\item\Item
$block Block
$target Block
$player pocketmine\Player

recalculateBoundingBox() защищенный Метод

$f = 0; $f1 = 0.5; $f2 = 0.5; $f3 = 1; if(($damage & 0x04) > 0){ $f = 0.5; $f1 = 1; $f2 = 0; $f3 = 0.5; } if($bb->intersectsWith($bb2 = AxisAlignedBB::getBoundingBoxFromPool( $this->x, $this->y + $f, $this->z, $this->x + 1, $this->y + $f1, $this->z + 1 ))){ $list[] = $bb2; } if($j === 0){ if($bb->intersectsWith($bb2 = AxisAlignedBB::getBoundingBoxFromPool( $this->x + 0.5, $this->y + $f2, $this->z, $this->x + 1, $this->y + $f3, $this->z + 1 ))){ $list[] = $bb2; } }elseif($j === 1){ if($bb->intersectsWith($bb2 = AxisAlignedBB::getBoundingBoxFromPool( $this->x, $this->y + $f2, $this->z, $this->x + 0.5, $this->y + $f3, $this->z + 1 ))){ $list[] = $bb2; } }elseif($j === 2){ if($bb->intersectsWith($bb2 = AxisAlignedBB::getBoundingBoxFromPool( $this->x, $this->y + $f2, $this->z + 0.5, $this->x + 1, $this->y + $f3, $this->z + 1 ))){ $list[] = $bb2; } }elseif($j === 3){ if($bb->intersectsWith($bb2 = AxisAlignedBB::getBoundingBoxFromPool( $this->x, $this->y + $f2, $this->z, $this->x + 1, $this->y + $f3, $this->z + 0.5 ))){ $list[] = $bb2; } } }
protected recalculateBoundingBox ( )