Slab placement

This commit is contained in:
Shoghi Cervantes Pueyo
2013-02-03 20:15:55 +01:00
parent d9c87161ba
commit fb9a0f2119
5 changed files with 43 additions and 5 deletions

View File

@@ -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;
}