From 5245147d004f648afcddec6a689e60d451c027bf Mon Sep 17 00:00:00 2001 From: LukBukkit Date: Wed, 23 Nov 2016 22:21:08 +0100 Subject: [PATCH] SPIGOT-619: Force rotate head of entities when setting location. --- src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 9f5133b60f..9fac33bd5a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -257,8 +257,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { entity.stopRiding(); entity.world = ((CraftWorld) location.getWorld()).getHandle(); - entity.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // 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 + return true; }