mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Added Wooden Slab bounding box
This commit is contained in:
parent
3731e74696
commit
6477f4f077
@ -22,6 +22,7 @@
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
|
use pocketmine\math\AxisAlignedBB;
|
||||||
use pocketmine\Player;
|
use pocketmine\Player;
|
||||||
|
|
||||||
class WoodSlab extends Transparent{
|
class WoodSlab extends Transparent{
|
||||||
@ -44,6 +45,17 @@ class WoodSlab extends Transparent{
|
|||||||
$this->hardness = 15;
|
$this->hardness = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getBoundingBox(){
|
||||||
|
return new AxisAlignedBB(
|
||||||
|
$this->x,
|
||||||
|
$this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0),
|
||||||
|
$this->z,
|
||||||
|
$this->x + 1,
|
||||||
|
$this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5),
|
||||||
|
$this->z + 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
||||||
$this->meta &= 0x07;
|
$this->meta &= 0x07;
|
||||||
if($face === 0){
|
if($face === 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user