Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
be2edeac2b
Diff to clone the item was lost, which meant that the spawned item was air.
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 11b3a0ece27cb2c01b908a9ac0c3d75f407f5ed0..7b01d1cd5db771a1b6ee030664070ffb75579a4c 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -1914,6 +1914,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) {
|
|
@@ -1956,6 +1957,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() {
|