From 8aef462a68df84b70df08b610c8ae03f368546fd Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sun, 8 Sep 2013 10:45:36 +0200 Subject: [PATCH] Fixed #784 Slabs replacing other slabs --- src/material/block/nonfull/Slab.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/material/block/nonfull/Slab.php b/src/material/block/nonfull/Slab.php index feeeacca8..d72ca7537 100644 --- a/src/material/block/nonfull/Slab.php +++ b/src/material/block/nonfull/Slab.php @@ -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){