geforkt von Mirrors/Paper
18f0f8d1ca
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 312281ea PR-742: Make World implement Keyed CraftBukkit Changes: 2ac7fa7a SPIGOT-7014: getLootTable API should not persistently update loot table 7fdd7941 PR-1046: Make World implement Keyed 7bc728a6 PR-1045: Revert changes to persistence required checks Spigot Changes: b6d12d17 Rebuild patches
30 Zeilen
1.4 KiB
Diff
30 Zeilen
1.4 KiB
Diff
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 d3b78f536806246d0474a00bd482b69651455ccf..ac6e01dbf4fe30b9e8301d995392a9c6581eae7b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -1665,6 +1665,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
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) {
|
|
@@ -1703,6 +1704,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
this.setXRot(pitch);
|
|
this.setOldPosAndRot();
|
|
this.reapplyPosition();
|
|
+ this.setYHeadRot(yaw); // Paper - Update head rotation
|
|
}
|
|
|
|
public final void setOldPosAndRot() {
|