Fixed Entity->getLineOfSight()

This commit is contained in:
Shoghi Cervantes 2014-10-10 09:53:58 +02:00
parent 13ec046f0d
commit 9ede8177df
2 changed files with 2 additions and 2 deletions

View File

@ -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
);

View File

@ -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();