From c3f4def9ea158dc165229bcfaa7588313bd2c7dd Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 21 Aug 2023 03:13:50 +0300 Subject: [PATCH] fixed BedBlock formatting --- src/material/block/misc/BedBlock.php | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/material/block/misc/BedBlock.php b/src/material/block/misc/BedBlock.php index 176e1dab..ea18e18a 100644 --- a/src/material/block/misc/BedBlock.php +++ b/src/material/block/misc/BedBlock.php @@ -16,28 +16,28 @@ class BedBlock extends TransparentBlock{ return true; } - $blockNorth = $this->getSide(2); //Gets the blocks around them - $blockSouth = $this->getSide(3); - $blockEast = $this->getSide(5); - $blockWest = $this->getSide(4); - if(($this->meta & 0x08) === 0x08){ //This is the Top part of bed - $b = $this; - }else{ //Bottom Part of Bed - if($blockNorth->getID() === $this->id and ($blockNorth->meta & 0x08) === 0x08){ - $b = $blockNorth; - }elseif($blockSouth->getID() === $this->id and ($blockSouth->meta & 0x08) === 0x08){ - $b = $blockSouth; - }elseif($blockEast->getID() === $this->id and ($blockEast->meta & 0x08) === 0x08){ - $b = $blockEast; - }elseif($blockWest->getID() === $this->id and ($blockWest->meta & 0x08) === 0x08){ - $b = $blockWest; - }else{ - $pk = new ChatPacket; - $pk->message = "This bed is incomplete"; - $player->dataPacket($pk); - return true; - } + $blockNorth = $this->getSide(2); //Gets the blocks around them + $blockSouth = $this->getSide(3); + $blockEast = $this->getSide(5); + $blockWest = $this->getSide(4); + if(($this->meta & 0x08) === 0x08){ //This is the Top part of bed + $b = $this; + }else{ //Bottom Part of Bed + if($blockNorth->getID() === $this->id and ($blockNorth->meta & 0x08) === 0x08){ + $b = $blockNorth; + }elseif($blockSouth->getID() === $this->id and ($blockSouth->meta & 0x08) === 0x08){ + $b = $blockSouth; + }elseif($blockEast->getID() === $this->id and ($blockEast->meta & 0x08) === 0x08){ + $b = $blockEast; + }elseif($blockWest->getID() === $this->id and ($blockWest->meta & 0x08) === 0x08){ + $b = $blockWest; + }else{ + $pk = new ChatPacket; + $pk->message = "This bed is incomplete"; + $player->dataPacket($pk); + return true; } + } if($player->sleepOn($b) === false){ $pk = new ChatPacket;