mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Slab placement
This commit is contained in:
parent
d9c87161ba
commit
fb9a0f2119
5 changed files with 43 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue