diff --git a/Spigot-Server-Patches/0204-Set-head-rotation-pitch-in-addition-to-yaw-on-TP.patch b/Spigot-Server-Patches/0204-Set-head-rotation-pitch-in-addition-to-yaw-on-TP.patch new file mode 100644 index 0000000000..35aab6e55a --- /dev/null +++ b/Spigot-Server-Patches/0204-Set-head-rotation-pitch-in-addition-to-yaw-on-TP.patch @@ -0,0 +1,48 @@ +From bf4ed5aa40c8a1a993f19a827389037a379dee53 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Sat, 7 Jan 2017 21:31:32 -0600 +Subject: [PATCH] Set head rotation pitch in addition to yaw on TP + + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index ea36c53..e8fdded 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -2213,8 +2213,10 @@ public abstract class Entity implements ICommandListener { + return 0.0F; + } + ++ public final void setHeadRotationYaw(float yaw) { this.h(yaw); } // Paper - OBFHELPER + public void h(float f) {} + ++ public final void setHeadRotationPitch(float pitch) { this.i(pitch); } // Paper - OBFHELPER + public void i(float f) {} + + public boolean aV() { +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +index 2b1ca7e..4acb404 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +@@ -14,7 +14,6 @@ import org.bukkit.Location; + import org.bukkit.Server; + import org.bukkit.World; + import org.bukkit.craftbukkit.CraftServer; +-import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.event.entity.EntityDamageEvent; + import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; + import org.bukkit.metadata.MetadataValue; +@@ -275,7 +274,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { + // entity.setLocation() throws no event, and so cannot be cancelled + entity.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); + // SPIGOT-619: Force sync head rotation also +- entity.h(location.getYaw()); // PAIL: setHeadRotation ++ // Paper start - GH-473 - Set pitch as well as yaw, rename both calls to use our obfuscation helpers ++ entity.setHeadRotationPitch(location.getPitch()); ++ entity.setHeadRotationYaw(location.getYaw()); // PAIL: setHeadRotation ++ // Paper end + entity.world.entityJoinedWorld(entity, false); // Spigot - register to new chunk + + return true; +-- +2.9.3 +