mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Check for player in range for slab placement
This commit is contained in:
parent
fb9a0f2119
commit
d1610ce7a1
@ -56,7 +56,7 @@ class SlabBlock extends TransparentBlock{
|
||||
$level->setBlock($target, DOUBLE_SLAB, $this->meta & 0x07);
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
}elseif(!$player->entity->inBlock($block->x, $block->y, $block->z)){
|
||||
if($block->getID() === SLAB){
|
||||
if(($block->getMetadata() & 0x07) === ($this->meta & 0x07)){
|
||||
$level->setBlock($block, DOUBLE_SLAB, $this->meta & 0x07);
|
||||
@ -68,7 +68,9 @@ class SlabBlock extends TransparentBlock{
|
||||
$this->meta |= 0x08;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
$level->setBlock($block, $this->id, $this->meta);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user