mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 15:36:08 +00:00
Slab placement
This commit is contained in:
@@ -531,19 +531,23 @@ class BlockAPI{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($block->isReplaceable === true and $item->isPlaceable()){
|
||||
if($item->isPlaceable()){
|
||||
$hand = $item->getBlock();
|
||||
}else{
|
||||
return $this->cancelAction($block);
|
||||
}
|
||||
|
||||
if(!($block->isReplaceable === true or ($hand->getID() === SLAB and $block->getID() === SLAB))){
|
||||
return $this->cancelAction($block);
|
||||
}
|
||||
|
||||
if($hand->isTransparent === false and $player->entity->inBlock($block->x, $block->y, $block->z)){
|
||||
return $this->cancelAction($block); //Entity in block
|
||||
}
|
||||
|
||||
//$direction = $player->entity->getDirection();
|
||||
|
||||
if($hand->place($this, $item, $player, $block, $target, $data["face"]) === false){
|
||||
if($hand->place($this, $item, $player, $block, $target, $data["face"], $data["fx"], $data["fy"], $data["fz"]) === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user