From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Mon, 21 Jun 2021 21:55:23 -0400 Subject: [PATCH] Update head rotation in missing places In certain areas the player's head rotation could be desynced when teleported/moved. This is because bukkit uses a separate head rotation field for yaw. This issue only applies to players. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index 99b87b783dfb3d0e00e3e03e5721feaef1c1ecf0..0dd2fcc51b7d07f68fdc630f7c73dcdc32282e90 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1830,6 +1830,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F); this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); + this.setYHeadRot(yaw); // Paper - Update head rotation } public void absMoveTo(double x, double y, double z) { @@ -1868,6 +1869,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S this.setXRot(pitch); this.setOldPosAndRot(); this.reapplyPosition(); + this.setYHeadRot(yaw); // Paper - Update head rotation } public final void setOldPosAndRot() {