mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
added step
This commit is contained in:
parent
2c264a023a
commit
92209861ee
5 changed files with 84 additions and 16 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
|
||||
//TODO make it extend SlabBlock
|
||||
class WoodSlabBlock extends TransparentBlock{
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(WOOD_SLAB, $meta, "Wooden Slab");
|
||||
|
|
@ -17,7 +17,10 @@ class WoodSlabBlock extends TransparentBlock{
|
|||
}
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){
|
||||
if(($level->level->getBlockDamage($x, $y, $z) & 0x08) == 0x08) return [new AxisAlignedBB($x, $y, $z, $x + 1, $y + 1, $z + 1)];
|
||||
return [new AxisAlignedBB($x, $y, $z, $x + 1, $y + 0.5, $z + 1)];
|
||||
}
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$this->meta &= 0x07;
|
||||
if($face === 0){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue