Fixed slab placement, close #145

This commit is contained in:
Dylan K. Taylor
2017-07-15 17:49:21 +01:00
parent c394aea803
commit f2ff0198cc
9 changed files with 21 additions and 18 deletions

View File

@ -78,6 +78,10 @@ class WoodenSlab extends Transparent{
}
}
public function canBeReplaced(Block $with = null) : bool{
return $with !== null and $with->getId() === $this->getId() and ($with->getDamage() & 0x07) === ($this->getDamage() & 0x07);
}
public function place(Item $item, Block $block, Block $target, int $face, Vector3 $facePos, Player $player = null) : bool{
$this->meta &= 0x07;
if($face === Vector3::SIDE_DOWN){