mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
4 bugs were fixed
This commit is contained in:
parent
107afb434b
commit
828599184c
5 changed files with 9 additions and 5 deletions
|
|
@ -11,8 +11,14 @@ class TrapdoorBlock extends TransparentBlock{
|
|||
}
|
||||
$this->hardness = 15;
|
||||
}
|
||||
|
||||
public function canAttachTo(Block $target){
|
||||
$id = $target->getID();
|
||||
return $id === SLAB || $id === GLOWSTONE || $id === SLAB || $id === WOOD_SLAB || (!$target->isTransparent || $target instanceof StairBlock);
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if(($target->isTransparent === false or $target->getID() === SLAB) and $face !== 0 and $face !== 1){
|
||||
if(($this->canAttachTo($target)) and $face !== 0 and $face !== 1){
|
||||
$faces = array(
|
||||
2 => 0,
|
||||
3 => 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue