Player: fixed attack sounds being added at the wrong position

This commit is contained in:
Dylan K. Taylor 2021-01-08 00:04:05 +00:00
parent a3597e195a
commit 574b615b4c
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -1657,7 +1657,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$entity->attack($ev);
$soundPos = $entity->getPosition()->add(0, $entity->width / 2, 0);
$soundPos = $entity->getPosition()->add(0, $entity->height / 2, 0);
if($ev->isCancelled()){
$this->getWorld()->addSound($soundPos, new EntityAttackNoDamageSound());
return false;