mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Improve seapony tail animations
This commit is contained in:
parent
72004812f2
commit
91918bab0c
2 changed files with 11 additions and 6 deletions
|
@ -73,10 +73,7 @@ public class SeaponyModel<T extends LivingEntity> extends UnicornModel<T> {
|
|||
|
||||
leftFin.yaw = finAngle;
|
||||
rightFin.yaw = -finAngle;
|
||||
|
||||
if (!attributes.isSleeping) {
|
||||
centerFin.roll = flapMotion;
|
||||
}
|
||||
|
||||
if (!entity.isSubmergedInWater()) {
|
||||
leftArm.pitch -= 0.5F;
|
||||
|
|
|
@ -17,8 +17,8 @@ public class SeaponyTail implements IPart, MsonModel {
|
|||
|
||||
public SeaponyTail(ModelPart tree) {
|
||||
tailBase = tree.getChild("base");
|
||||
tailTip = tree.getChild("tip");
|
||||
tailFins = tree.getChild("fins");
|
||||
tailTip = tailBase.getChild("tip");
|
||||
tailFins = tailTip.getChild("fins");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,6 +28,14 @@ public class SeaponyTail implements IPart, MsonModel {
|
|||
tailBase.pitch = MathHelper.HALF_PI + rotation;
|
||||
tailTip.pitch = rotation;
|
||||
tailFins.pitch = rotation - MathHelper.HALF_PI;
|
||||
|
||||
float turn = MathHelper.clamp(attributes.motionRoll * 0.05F + bodySwing, -0.4F, 0.4F);
|
||||
|
||||
tailBase.yaw = turn;
|
||||
turn /= 2F;
|
||||
tailTip.roll = -turn;
|
||||
turn /= 2F;
|
||||
tailFins.roll = -turn;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue