Merge pull request #57 from Sunch233/master

Fixed a bug where players could place blocks inside their bodies
This commit is contained in:
enirboreHemaG 2025-04-07 17:22:57 +03:00 • committed by GitHub
commit 6d8becc891
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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
}