Fixed wings of icarus not having correct angles when worn by a mob

This commit is contained in:
Sollace 2021-02-27 22:57:32 +02:00
parent 002ace1846
commit f067e67eca

View file

@ -108,10 +108,7 @@ public class WingsFeatureRenderer<E extends LivingEntity> implements AccessoryFe
}
void setAngles(LivingEntity entity) {
if (entity instanceof PlayerEntity) {
Pony pony = Pony.of((PlayerEntity)entity);
float spreadAmount = pony.getMotion().getWingAngle();
float spreadAmount = entity instanceof PlayerEntity ? Pony.of((PlayerEntity)entity).getMotion().getWingAngle() : 0;
base.pitch = 1.5F + 0.8F - spreadAmount / 9F;
base.yaw = k * (0.8F + spreadAmount / 3F);
@ -129,8 +126,6 @@ public class WingsFeatureRenderer<E extends LivingEntity> implements AccessoryFe
feathers[i].pitch = -spread;
feathers[i].yaw = k * 0.3F;
}
}
}
}
}