From 31c187f3664fa3f72b3bc22f4a2ff3cdd4c47843 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 13 Jun 2018 04:16:52 -0400 Subject: [PATCH] Bed: fixed recursion when setting state to something it already is fixes #2236 --- src/pocketmine/block/Bed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/block/Bed.php b/src/pocketmine/block/Bed.php index 830310ea5..8a3131616 100644 --- a/src/pocketmine/block/Bed.php +++ b/src/pocketmine/block/Bed.php @@ -85,7 +85,7 @@ class Bed extends Transparent{ $this->getLevel()->setBlock($this, $this, false, false); - if(($other = $this->getOtherHalf()) !== null and !$other->isOccupied()){ + if(($other = $this->getOtherHalf()) !== null and $other->isOccupied() !== $occupied){ $other->setOccupied($occupied); } }