mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Entity: replace separate height/width/eyeHeight fields with an EntitySizeInfo structure
this will make it easier to implement stuff like sleeping (properly), swimming and gliding without needing to duplicate all the fields.
This commit is contained in:
@ -1657,7 +1657,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
|
||||
$entity->attack($ev);
|
||||
|
||||
$soundPos = $entity->getPosition()->add(0, $entity->height / 2, 0);
|
||||
$soundPos = $entity->getPosition()->add(0, $entity->size->getHeight() / 2, 0);
|
||||
if($ev->isCancelled()){
|
||||
$this->getWorld()->addSound($soundPos, new EntityAttackNoDamageSound());
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user