mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 11:36:43 +01:00
Fixed drake not updating when it grabs a spell, and make them stand at eye height
This commit is contained in:
parent
2895e5881c
commit
6a17f1dd1c
2 changed files with 5 additions and 1 deletions
|
@ -76,7 +76,7 @@ public class ModelGem extends ModelBase {
|
|||
EntitySpell spell = (EntitySpell)entity;
|
||||
|
||||
float floatOffset = MathHelper.sin((spell.ticksExisted + stutter) / 10 + spell.hoverStart) / 10 + 0.1F;
|
||||
GlStateManager.translate(0, floatOffset, 0);
|
||||
GlStateManager.translate(0, floatOffset - entity.getEyeHeight(), 0);
|
||||
|
||||
floatOffset = (spell.ticksExisted + stutter) / 20;
|
||||
if (spell.getCurrentLevel() > 0) {
|
||||
|
|
|
@ -64,6 +64,9 @@ public class SpellDrake extends AbstractSpell {
|
|||
((PathNavigateGround)living.getNavigator()).setCanSwim(false);
|
||||
living.tasks.addTask(1, new EntityAISwimming(living));
|
||||
living.tasks.addTask(2, new EntityAIFollowCaster<>(source, 1, 4, 70));
|
||||
living.height = 1.8F;
|
||||
|
||||
living.setPosition(living.posX, living.posY, living.posZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,6 +80,7 @@ public class SpellDrake extends AbstractSpell {
|
|||
piggyBackSpell = i.getEffect().copy();
|
||||
piggyBackSpell.onPlaced(source);
|
||||
i.setEffect(null);
|
||||
setDirty(true);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue