From 66d43228cd7315225e205401348470ec07a6107a Mon Sep 17 00:00:00 2001 From: Michael Yoo Date: Tue, 19 Feb 2013 18:10:55 +1030 Subject: [PATCH] Added comments to bed block fix --- src/material/block/misc/Bed.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/material/block/misc/Bed.php b/src/material/block/misc/Bed.php index bfe57a71a..4f34e2ec3 100644 --- a/src/material/block/misc/Bed.php +++ b/src/material/block/misc/Bed.php @@ -56,15 +56,15 @@ class BedBlock extends TransparentBlock{ } public function onBreak(BlockAPI $level, Item $item, Player $player){ - if($this->inWorld === true){ - $blockNorth = $level->getBlockFace($this, 2); + if($this->inWorld === true){//Checks if the block was in the world or not. Just in case + $blockNorth = $level->getBlockFace($this, 2);//Gets the blocks around them $blockSouth = $level->getBlockFace($this, 3); $blockEast = $level->getBlockFace($this, 5); $blockWest = $level->getBlockFace($this, 4); if(($this->meta & 0x08) === 0x08){//This is the Top part of bed - if($blockNorth->getID() === $this->id and $blockNorth->meta != 0x08) + if($blockNorth->getID() === $this->id and $blockNorth->meta != 0x08)//Checks if the block ID and meta are right $level->setBlock($blockNorth, 0, 0); if($blockSouth->getID() === $this->id and $blockSouth->meta != 0x08) $level->setBlock($blockSouth, 0, 0);