Fixed gem render location not matching its actual location

This commit is contained in:
Sollace 2019-02-06 10:30:49 +02:00
parent 6a17f1dd1c
commit c3eb588f3c

View file

@ -75,8 +75,10 @@ public class ModelGem extends ModelBase {
EntitySpell spell = (EntitySpell)entity; EntitySpell spell = (EntitySpell)entity;
float eyes = entity.getEyeHeight();
float floatOffset = MathHelper.sin((spell.ticksExisted + stutter) / 10 + spell.hoverStart) / 10 + 0.1F; 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; floatOffset = (spell.ticksExisted + stutter) / 20;
if (spell.getCurrentLevel() > 0) { if (spell.getCurrentLevel() > 0) {