mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 19:55:33 +00:00
Fixed #784 Slabs replacing other slabs
This commit is contained in:
parent
c4a5a9c849
commit
8aef462a68
@ -46,6 +46,9 @@ class SlabBlock extends TransparentBlock{
|
||||
if($target->getID() === SLAB and ($target->getMetadata() & 0x08) === 0x08 and ($target->getMetadata() & 0x07) === ($this->meta & 0x07)){
|
||||
$this->level->setBlock($target, BlockAPI::get(DOUBLE_SLAB, $this->meta), true, false, true);
|
||||
return true;
|
||||
}elseif($block->getID() === SLAB and ($block->getMetadata() & 0x07) === ($this->meta & 0x07)){
|
||||
$this->level->setBlock($block, BlockAPI::get(DOUBLE_SLAB, $this->meta), true, false, true);
|
||||
return true;
|
||||
}else{
|
||||
$this->meta |= 0x08;
|
||||
}
|
||||
@ -53,6 +56,9 @@ class SlabBlock extends TransparentBlock{
|
||||
if($target->getID() === SLAB and ($target->getMetadata() & 0x08) === 0 and ($target->getMetadata() & 0x07) === ($this->meta & 0x07)){
|
||||
$this->level->setBlock($target, BlockAPI::get(DOUBLE_SLAB, $this->meta), true, false, true);
|
||||
return true;
|
||||
}elseif($block->getID() === SLAB and ($block->getMetadata() & 0x07) === ($this->meta & 0x07)){
|
||||
$this->level->setBlock($block, BlockAPI::get(DOUBLE_SLAB, $this->meta), true, false, true);
|
||||
return true;
|
||||
}
|
||||
}elseif(!$player->entity->inBlock($block)){
|
||||
if($block->getID() === SLAB){
|
||||
|
Loading…
x
Reference in New Issue
Block a user