From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: MrHua269 Date: Wed, 8 Jul 2026 21:37:19 +0800 Subject: [PATCH] Fix teleport yam and pitch were ignored during teleport command diff --git a/net/minecraft/server/commands/TeleportCommand.java b/net/minecraft/server/commands/TeleportCommand.java index 13d7965fd4f99f0848b080349df41f8b1c31a19b..54a8747351fd50ddd794a777aa405431a0dc6311 100644 --- a/net/minecraft/server/commands/TeleportCommand.java +++ b/net/minecraft/server/commands/TeleportCommand.java @@ -248,8 +248,8 @@ public class TeleportCommand { // Folia start - region threading if (true) { Vec3 posFinal = new Vec3(x, y, z); - Float yawFinal = Float.valueOf(newYRot); - Float pitchFinal = Float.valueOf(newXRot); + Float yawFinal = Float.valueOf(newYRot + victim.getYRot()); // Camellia - Fix teleport yaw issue + Float pitchFinal = Float.valueOf(newXRot + victim.getXRot()); // Camellia - Fix teleport pitch issue victim.getBukkitEntity().taskScheduler.schedule((Entity nmsEntity) -> { nmsEntity.stopRiding(); nmsEntity.teleportAsync(