Slab: fixed replacing $blockReplace not creating double slab when not clicking on the replaced block itself

This commit is contained in:
Dylan K. Taylor 2019-02-19 11:09:07 +00:00
parent bf71ddb0b5
commit 18f765338c

View File

@ -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());