Получение зрительной позиции игрока и перемещение его в эту точку.

Версия Minecraft
1.12.2
API
Forge
Как мне получить позицию, на которую смотрит игрок и телепортировать его туда по нажатию клавиши? По нажатию клавиши я всё сделаю сам.
 
Решение
Getting the position where the player is looking:
public void someMethode(World world, EntityPlayer player) {
        Vec3d pos = new Vec3d(player.posX, player.posY + player.getEyeHeight(), player.posZ);
        Vec3d look = player.getLook(1);
        Vec3d vec32 = pos.addVector(look.x * 100, look.y * 100, look.z * 100);
        // vec31,
        // vec32,
        // stopOnLiquid,
        // ignoreBlockWithoutBoundingBox,
        // returnLastUncollidableBlock
        RayTraceResult result = player.world.rayTraceBlocks(pos, vec32, false, false, true);
        
        // the position the player is facing
        double i = result.getBlockPos().getX(); // position x
        double j = result.getBlockPos().getY(); // position y
        double k = result.getBlockPos().getZ(); //...
60
6
31
Getting the position where the player is looking:
public void someMethode(World world, EntityPlayer player) {
        Vec3d pos = new Vec3d(player.posX, player.posY + player.getEyeHeight(), player.posZ);
        Vec3d look = player.getLook(1);
        Vec3d vec32 = pos.addVector(look.x * 100, look.y * 100, look.z * 100);
        // vec31,
        // vec32,
        // stopOnLiquid,
        // ignoreBlockWithoutBoundingBox,
        // returnLastUncollidableBlock
        RayTraceResult result = player.world.rayTraceBlocks(pos, vec32, false, false, true);
        
        // the position the player is facing
        double i = result.getBlockPos().getX(); // position x
        double j = result.getBlockPos().getY(); // position y
        double k = result.getBlockPos().getZ(); // position z
}
 
Сверху