From c3eb588f3c8d9ad64104c5afd1a85b310e90e915 Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 6 Feb 2019 10:30:49 +0200 Subject: [PATCH] Fixed gem render location not matching its actual location --- src/main/java/com/minelittlepony/unicopia/model/ModelGem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/model/ModelGem.java b/src/main/java/com/minelittlepony/unicopia/model/ModelGem.java index dce49f82..5f03c7fc 100644 --- a/src/main/java/com/minelittlepony/unicopia/model/ModelGem.java +++ b/src/main/java/com/minelittlepony/unicopia/model/ModelGem.java @@ -75,8 +75,10 @@ public class ModelGem extends ModelBase { EntitySpell spell = (EntitySpell)entity; + float eyes = entity.getEyeHeight(); + float floatOffset = MathHelper.sin((spell.ticksExisted + stutter) / 10 + spell.hoverStart) / 10 + 0.1F; - GlStateManager.translate(0, floatOffset - entity.getEyeHeight(), 0); + GlStateManager.translate(0, floatOffset - (eyes > 0.25F ? eyes : 0), 0); floatOffset = (spell.ticksExisted + stutter) / 20; if (spell.getCurrentLevel() > 0) {