mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +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
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class IronDoorBlock extends DoorBlock{
|
|||
}
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array(
|
||||
array(330, 0, 1),
|
||||
array(IRON_DOOR, 0, 1),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ class WoodDoorBlock extends DoorBlock{
|
|||
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return array(
|
||||
array(324, 0, 1),
|
||||
array(WOODEN_DOOR, 0, 1),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue