aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0625-Update-head-rotation-in-missing-places.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-06-16 12:56:00 +0200
committerNassim Jahnke <[email protected]>2024-06-16 12:56:00 +0200
commitdc684c60d16f66ea84467ec8e253f2a36a17a7c8 (patch)
treee516f1bd4bfbdb37a5aeee42384aade111eca3e1 /patches/server/0625-Update-head-rotation-in-missing-places.patch
parent752f957e12e4ceb8b7d2043a4a7dbce786b7b98f (diff)
downloadPaper-dc684c60d16f66ea84467ec8e253f2a36a17a7c8.tar.gz
Paper-dc684c60d16f66ea84467ec8e253f2a36a17a7c8.zip
Remove bad server.scheduleOnMain disconnect calls from old patches
The new behavior of disconnect to block the current thread until the disconnect succeeded is better than throwing it off to happen at some point
Diffstat (limited to 'patches/server/0625-Update-head-rotation-in-missing-places.patch')
-rw-r--r--patches/server/0625-Update-head-rotation-in-missing-places.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/server/0625-Update-head-rotation-in-missing-places.patch b/patches/server/0625-Update-head-rotation-in-missing-places.patch
new file mode 100644
index 0000000000..ab7ede0fd7
--- /dev/null
+++ b/patches/server/0625-Update-head-rotation-in-missing-places.patch
@@ -0,0 +1,29 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Owen1212055 <[email protected]>
+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 4542c6a7c48bfcb8a5acf127944e24b60dfc13e1..42afa622c97cc7da666cfb3019f417c96842d318 100644
+--- a/src/main/java/net/minecraft/world/entity/Entity.java
++++ b/src/main/java/net/minecraft/world/entity/Entity.java
+@@ -1845,6 +1845,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ 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) {
+@@ -1887,6 +1888,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ this.setXRot(pitch);
+ this.setOldPosAndRot();
+ this.reapplyPosition();
++ this.setYHeadRot(yaw); // Paper - Update head rotation
+ }
+
+ public final void setOldPosAndRot() {