Fix #145, take 2 (slab placement in half gaps doesn't work) (#1411)

This commit is contained in:
Dylan K. Taylor
2017-10-01 16:19:59 +01:00
committed by GitHub
parent b3b3ee7c56
commit c09d782503
3 changed files with 19 additions and 6 deletions

View File

@ -1774,14 +1774,11 @@ class Level implements ChunkManager, Metadatable{
return false;
}
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() === true){
if($hand->canBePlacedAt($blockClicked, $facePos)){
$blockReplace = $blockClicked;
$hand->position($blockReplace);
//$face = -1;
}elseif(!$hand->canBePlacedAt($blockReplace, $facePos)){
return false;
}
if($hand->isSolid() === true and $hand->getBoundingBox() !== null){