From 18f765338c2b199ba73ec27f40c5729e3bfd7a44 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 19 Feb 2019 11:09:07 +0000 Subject: [PATCH] Slab: fixed replacing $blockReplace not creating double slab when not clicking on the replaced block itself --- src/pocketmine/block/Slab.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/block/Slab.php b/src/pocketmine/block/Slab.php index ef7950e2f..d293c2768 100644 --- a/src/pocketmine/block/Slab.php +++ b/src/pocketmine/block/Slab.php @@ -88,8 +88,8 @@ abstract class Slab extends Transparent{ } if($blockReplace instanceof Slab and $blockReplace->isSameType($this) and ( - ($blockReplace->top and $clickVector->y <= 0.5) or - (!$blockReplace->top and $clickVector->y >= 0.5) + ($blockReplace->top and ($clickVector->y <= 0.5 or $face === Facing::UP)) or + (!$blockReplace->top and ($clickVector->y >= 0.5 or $face === Facing::DOWN)) )){ //Clicked in empty half of existing slab return $this->level->setBlock($blockReplace, $this->getDouble());