mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fixed #1750 cannot place slabs against blocks
This commit is contained in:
parent
0907aedcef
commit
593b0497b0
@ -94,7 +94,7 @@ class Slab extends Transparent{
|
||||
return true;
|
||||
}
|
||||
//TODO: check for collision
|
||||
}elseif(!($player instanceof Player)){
|
||||
}else{
|
||||
if($block->getID() === self::SLAB){
|
||||
if(($block->getDamage() & 0x07) === ($this->meta & 0x07)){
|
||||
$this->getLevel()->setBlock($block, Block::get(Item::DOUBLE_SLAB, $this->meta), true);
|
||||
@ -108,9 +108,8 @@ class Slab extends Transparent{
|
||||
$this->meta |= 0x08;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($block->getID() === self::SLAB and ($target->getDamage() & 0x07) !== ($this->meta & 0x07)){
|
||||
return false;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ class WoodSlab extends Transparent{
|
||||
|
||||
return true;
|
||||
}
|
||||
}elseif(!($player instanceof Player)){ //TODO: collision
|
||||
}else{ //TODO: collision
|
||||
if($block->getID() === self::WOOD_SLAB){
|
||||
if(($block->getDamage() & 0x07) === ($this->meta & 0x07)){
|
||||
$this->getLevel()->setBlock($block, Block::get(Item::DOUBLE_WOOD_SLAB, $this->meta), true);
|
||||
@ -105,9 +105,8 @@ class WoodSlab extends Transparent{
|
||||
$this->meta |= 0x08;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($block->getID() === self::WOOD_SLAB and ($target->getDamage() & 0x07) !== ($this->meta & 0x07)){
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user