mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
Slab: fixed replacing $blockReplace not creating double slab when not clicking on the replaced block itself
This commit is contained in:
parent
bf71ddb0b5
commit
18f765338c
@ -88,8 +88,8 @@ abstract class Slab extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($blockReplace instanceof Slab and $blockReplace->isSameType($this) and (
|
if($blockReplace instanceof Slab and $blockReplace->isSameType($this) and (
|
||||||
($blockReplace->top and $clickVector->y <= 0.5) or
|
($blockReplace->top and ($clickVector->y <= 0.5 or $face === Facing::UP)) or
|
||||||
(!$blockReplace->top and $clickVector->y >= 0.5)
|
(!$blockReplace->top and ($clickVector->y >= 0.5 or $face === Facing::DOWN))
|
||||||
)){
|
)){
|
||||||
//Clicked in empty half of existing slab
|
//Clicked in empty half of existing slab
|
||||||
return $this->level->setBlock($blockReplace, $this->getDouble());
|
return $this->level->setBlock($blockReplace, $this->getDouble());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user