mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Better door Hinges
This commit is contained in:
parent
e07302b021
commit
34f0e5170b
3 changed files with 4 additions and 3 deletions
|
|
@ -45,8 +45,9 @@ class DoorBlock extends TransparentBlock{
|
|||
3 => 5,
|
||||
);
|
||||
$next = $level->getBlockFace($block, $face[(($direction + 2) % 4)]);
|
||||
$next2 = $level->getBlockFace($block, $face[$direction]);
|
||||
$metaUp = 0x08;
|
||||
if($next->getID() === $this->id){ //Door hinge
|
||||
if($next->getID() === $this->id or ($next2->isTransparent === false and $next->isTransparent === true)){ //Door hinge
|
||||
$metaUp |= 0x01;
|
||||
}
|
||||
$level->setBlock($blockUp, $this->id, $metaUp); //Top
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue