mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
This reverts commit f2ff0198cc
.
This commit is contained in:
@ -1723,20 +1723,23 @@ class Level implements ChunkManager, Metadatable{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!$item->canBePlaced()){
|
||||
if($item->canBePlaced()){
|
||||
$hand = $item->getBlock();
|
||||
$hand->position($blockReplace);
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
$hand = $item->getBlock();
|
||||
if(!($blockReplace->canBeReplaced() === true or ($hand->getId() === Item::WOODEN_SLAB and $blockReplace->getId() === Item::WOODEN_SLAB) or ($hand->getId() === Item::STONE_SLAB and $blockReplace->getId() === Item::STONE_SLAB))){
|
||||
return false;
|
||||
}
|
||||
|
||||
if($blockClicked->canBeReplaced($hand)){
|
||||
if($blockClicked->canBeReplaced() === true){
|
||||
$blockReplace = $blockClicked;
|
||||
}elseif(!$blockReplace->canBeReplaced($hand)){
|
||||
return false;
|
||||
$hand->position($blockReplace);
|
||||
//$face = -1;
|
||||
}
|
||||
|
||||
$hand->position($blockReplace);
|
||||
|
||||
if($hand->isSolid() === true and $hand->getBoundingBox() !== null){
|
||||
$entities = $this->getCollidingEntities($hand->getBoundingBox());
|
||||
foreach($entities as $e){
|
||||
|
Reference in New Issue
Block a user