diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 66f8f3c59..6ae3bd1de 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -943,7 +943,7 @@ abstract class Entity extends Position implements Metadatable{ $pos = new Vector3( ($this->boundingBox->minX + $this->boundingBox->maxX) / 2, - $this->boundingBox->minY - $this->ySize/* + $this->height*/, + $this->boundingBox->minY - $this->ySize, ($this->boundingBox->minZ + $this->boundingBox->maxZ) / 2 ); diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index 6b39edd69..d98f00653 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -188,7 +188,7 @@ abstract class Living extends Entity implements Damageable{ } $blocks = []; - $itr = new BlockIterator($this->level, $this->getPosition(), $this->getEyeHeight(), $maxDistance); + $itr = new BlockIterator($this->level, $this->getPosition(), $this->getDirectionVector(), $this->getEyeHeight(), $maxDistance); while($itr->valid()){ $itr->next();