mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
fixed BedBlock formatting
This commit is contained in:
parent
14923444f2
commit
c3f4def9ea
1 changed files with 21 additions and 21 deletions
|
|
@ -16,28 +16,28 @@ class BedBlock extends TransparentBlock{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$blockNorth = $this->getSide(2); //Gets the blocks around them
|
$blockNorth = $this->getSide(2); //Gets the blocks around them
|
||||||
$blockSouth = $this->getSide(3);
|
$blockSouth = $this->getSide(3);
|
||||||
$blockEast = $this->getSide(5);
|
$blockEast = $this->getSide(5);
|
||||||
$blockWest = $this->getSide(4);
|
$blockWest = $this->getSide(4);
|
||||||
if(($this->meta & 0x08) === 0x08){ //This is the Top part of bed
|
if(($this->meta & 0x08) === 0x08){ //This is the Top part of bed
|
||||||
$b = $this;
|
$b = $this;
|
||||||
}else{ //Bottom Part of Bed
|
}else{ //Bottom Part of Bed
|
||||||
if($blockNorth->getID() === $this->id and ($blockNorth->meta & 0x08) === 0x08){
|
if($blockNorth->getID() === $this->id and ($blockNorth->meta & 0x08) === 0x08){
|
||||||
$b = $blockNorth;
|
$b = $blockNorth;
|
||||||
}elseif($blockSouth->getID() === $this->id and ($blockSouth->meta & 0x08) === 0x08){
|
}elseif($blockSouth->getID() === $this->id and ($blockSouth->meta & 0x08) === 0x08){
|
||||||
$b = $blockSouth;
|
$b = $blockSouth;
|
||||||
}elseif($blockEast->getID() === $this->id and ($blockEast->meta & 0x08) === 0x08){
|
}elseif($blockEast->getID() === $this->id and ($blockEast->meta & 0x08) === 0x08){
|
||||||
$b = $blockEast;
|
$b = $blockEast;
|
||||||
}elseif($blockWest->getID() === $this->id and ($blockWest->meta & 0x08) === 0x08){
|
}elseif($blockWest->getID() === $this->id and ($blockWest->meta & 0x08) === 0x08){
|
||||||
$b = $blockWest;
|
$b = $blockWest;
|
||||||
}else{
|
}else{
|
||||||
$pk = new ChatPacket;
|
$pk = new ChatPacket;
|
||||||
$pk->message = "This bed is incomplete";
|
$pk->message = "This bed is incomplete";
|
||||||
$player->dataPacket($pk);
|
$player->dataPacket($pk);
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($player->sleepOn($b) === false){
|
if($player->sleepOn($b) === false){
|
||||||
$pk = new ChatPacket;
|
$pk = new ChatPacket;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue