mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-25 14:14:32 +01:00
Fixed wings of icarus not having correct angles when worn by a mob
This commit is contained in:
parent
002ace1846
commit
f067e67eca
1 changed files with 11 additions and 16 deletions
|
@ -108,28 +108,23 @@ public class WingsFeatureRenderer<E extends LivingEntity> implements AccessoryFe
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAngles(LivingEntity entity) {
|
void setAngles(LivingEntity entity) {
|
||||||
if (entity instanceof PlayerEntity) {
|
float spreadAmount = entity instanceof PlayerEntity ? Pony.of((PlayerEntity)entity).getMotion().getWingAngle() : 0;
|
||||||
Pony pony = Pony.of((PlayerEntity)entity);
|
|
||||||
|
|
||||||
float spreadAmount = pony.getMotion().getWingAngle();
|
base.pitch = 1.5F + 0.8F - spreadAmount / 9F;
|
||||||
|
base.yaw = k * (0.8F + spreadAmount / 3F);
|
||||||
|
|
||||||
base.pitch = 1.5F + 0.8F - spreadAmount / 9F;
|
spreadAmount /= 7F;
|
||||||
base.yaw = k * (0.8F + spreadAmount / 3F);
|
|
||||||
|
|
||||||
spreadAmount /= 7F;
|
final float ratio = 4F;
|
||||||
|
|
||||||
final float ratio = 4F;
|
for (int i = 0; i < feathers.length; i++) {
|
||||||
|
|
||||||
for (int i = 0; i < feathers.length; i++) {
|
float spread = i/ratio + 1.5F;
|
||||||
|
spread -= spreadAmount * ratio;
|
||||||
float spread = i/ratio + 1.5F;
|
spread += spreadAmount * i / ratio;
|
||||||
spread -= spreadAmount * ratio;
|
|
||||||
spread += spreadAmount * i / ratio;
|
|
||||||
|
|
||||||
feathers[i].pitch = -spread;
|
|
||||||
feathers[i].yaw = k * 0.3F;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
feathers[i].pitch = -spread;
|
||||||
|
feathers[i].yaw = k * 0.3F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue