mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 11:36:43 +01:00
Fixed gems not hovering at the correct height
This commit is contained in:
parent
0ef986d406
commit
318e91ed8d
4 changed files with 2 additions and 5 deletions
|
@ -201,6 +201,7 @@ public class EntitySpell extends EntityCreature implements IMagicals, ICaster<En
|
|||
}
|
||||
|
||||
if (getEffect().allowAI()) {
|
||||
height = 1.5F;
|
||||
super.onUpdate();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue