changePos
fun Entity.changePos(x: Number = this.position().x, y: Number = this.position().y, z: Number = this.position().z, world: ServerLevel? = null, yaw: Float? = null, pitch: Float? = null)(source)
Correctly handles teleports for all kinds of entities. Differentiates between ServerPlayer, LivingEntity and Entity and calls the correct function for each of them. Handles ServerLevel and direction changes.