From c08c2a71807676a41acb0c3125afed1fa0748e66 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 28 Oct 2018 22:24:27 +0200 Subject: [PATCH] Fixed mis-positioned nameplates when riding --- src/main/java/com/minelittlepony/render/RenderPony.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/minelittlepony/render/RenderPony.java b/src/main/java/com/minelittlepony/render/RenderPony.java index c5719c2d..a1e258b9 100644 --- a/src/main/java/com/minelittlepony/render/RenderPony.java +++ b/src/main/java/com/minelittlepony/render/RenderPony.java @@ -157,6 +157,14 @@ public class RenderPony { y -= 0.25F; } + if (entity.isRiding()) { + y += entity.getRidingEntity().getEyeHeight(); + } + + if (entity.isPlayerSleeping()) { + y /= 2; + } + return initial + y; } }