mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Better door Hinges
This commit is contained in:
parent
e07302b021
commit
34f0e5170b
@ -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…
x
Reference in New Issue
Block a user