public function teleportImmediate(Vector3 $pos, $yaw = null, $pitch = null)
{
if (parent::teleport($pos, $yaw, $pitch)) {
foreach ($this->windowIndex as $window) {
if ($window === $this->inventory) {
continue;
}
$this->removeWindow($window);
}
$this->forceMovement = new Vector3($this->x, $this->y, $this->z);
$this->sendPosition($this, $this->yaw, $this->pitch, 1);
$this->resetFallDistance();
$this->orderChunks();
$this->nextChunkOrderRun = 0;
$this->newPosition = null;
}
}