Fixed gems not hovering at the correct height

This commit is contained in:
Sollace 2019-03-04 00:34:48 +02:00
parent 0ef986d406
commit 318e91ed8d
4 changed files with 2 additions and 5 deletions

View file

@ -201,6 +201,7 @@ public class EntitySpell extends EntityCreature implements IMagicals, ICaster<En
}
if (getEffect().allowAI()) {
height = 1.5F;
super.onUpdate();
}
}

View file

@ -75,10 +75,8 @@ 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 - (eyes > 0.25F ? eyes : 0), 0);
GlStateManager.translate(0, floatOffset - entity.getEyeHeight(), 0);
floatOffset = (spell.ticksExisted + stutter) / 20;
if (spell.getCurrentLevel() > 0) {

View file

@ -63,7 +63,6 @@ public class SpellDarkness extends AbstractAttachableSpell {
EntitySpell living = (EntitySpell)caster.getEntity();
living.tasks.addTask(1, new EntityAIAvoidEntity<>(living, EntityPlayer.class, 3, 4, 4));
living.height = 1.8F;
living.setPosition(living.posX, living.posY, living.posZ);
}

View file

@ -63,7 +63,6 @@ public class SpellDrake extends AbstractSpell {
((PathNavigateGround)living.getNavigator()).setCanSwim(false);
living.tasks.addTask(1, new EntityAISwimming(living));
living.tasks.addTask(2, new EntityAIFollowCaster<>(caster, 1, 4, 70));
living.height = 1.8F;
living.setPosition(living.posX, living.posY, living.posZ);
}