Fixed projectiles collding with spectator players

closes #1857
This commit is contained in:
Dylan K. Taylor
2018-01-17 10:57:04 +00:00
parent 9c65a2b890
commit 6f6e3aaa21
3 changed files with 9 additions and 1 deletions

View File

@@ -1067,6 +1067,10 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
return !$this->justCreated and $entity !== $this;
}
public function canBeCollidedWith() : bool{
return true;
}
protected function updateMovement(){
$diffPosition = ($this->x - $this->lastX) ** 2 + ($this->y - $this->lastY) ** 2 + ($this->z - $this->lastZ) ** 2;
$diffRotation = ($this->yaw - $this->lastYaw) ** 2 + ($this->pitch - $this->lastPitch) ** 2;