From 81d3b0ef105fc9b07645169a281d8b2764e1e2dd Mon Sep 17 00:00:00 2001
From: OnlyBMan <27742182+OnlyBMan@users.noreply.github.com>
Date: Thu, 21 May 2020 19:45:35 -0400
Subject: [PATCH] Fix painting rotation (#597)

* Fix painting rotation

* add comment and spacing

* Dont sleep everything :P

* Fix whitespace

* Remove whitespace

* Fix underlying issue

Instead of adding a delay, exclude Painting in HeadLookTranslator.java. Thanks AJ!

* Remove unneeded import

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
---
 .../translators/java/entity/JavaEntityHeadLookTranslator.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityHeadLookTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityHeadLookTranslator.java
index 09dd75f6..e26a5880 100644
--- a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityHeadLookTranslator.java
+++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityHeadLookTranslator.java
@@ -50,7 +50,7 @@ public class JavaEntityHeadLookTranslator extends PacketTranslator<ServerEntityH
 
         entity.setRotation(Vector3f.from(entity.getRotation().getX(), entity.getRotation().getY(), packet.getHeadYaw()));
 
-        if (entity.getEntityType() != EntityType.PLAYER) {
+        if (entity.getEntityType() != EntityType.PLAYER && entity.getEntityType() != EntityType.PAINTING) {
             MoveEntityAbsolutePacket moveEntityAbsolutePacket = new MoveEntityAbsolutePacket();
             moveEntityAbsolutePacket.setRuntimeEntityId(entity.getGeyserId());
             moveEntityAbsolutePacket.setPosition(entity.getPosition());