fixed place block in player

This commit is contained in:
Sunch 2025-04-07 22:19:58 +08:00
parent c69d41bbb3
commit 4b075d7724

View file

@ -502,7 +502,7 @@ class BlockAPI{
//$face = -1;
}
if($hand->isSolid === true and $player->entity->inBlock($block) && ($hand->getID() != BED_BLOCK && $hand->getID() != CARPET)){
if($hand->isSolid === true and $block->boundingBox->intersectsWith($player->entity->boundingBox) && ($hand->getID() != BED_BLOCK && $hand->getID() != CARPET)){
return $this->cancelAction($block, $player, false); //Entity in block
}