mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24: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;
|
leftFin.yaw = finAngle;
|
||||||
rightFin.yaw = -finAngle;
|
rightFin.yaw = -finAngle;
|
||||||
|
centerFin.roll = flapMotion;
|
||||||
if (!attributes.isSleeping) {
|
|
||||||
centerFin.roll = flapMotion;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!entity.isSubmergedInWater()) {
|
if (!entity.isSubmergedInWater()) {
|
||||||
leftArm.pitch -= 0.5F;
|
leftArm.pitch -= 0.5F;
|
||||||
|
|
|
@ -17,8 +17,8 @@ public class SeaponyTail implements IPart, MsonModel {
|
||||||
|
|
||||||
public SeaponyTail(ModelPart tree) {
|
public SeaponyTail(ModelPart tree) {
|
||||||
tailBase = tree.getChild("base");
|
tailBase = tree.getChild("base");
|
||||||
tailTip = tree.getChild("tip");
|
tailTip = tailBase.getChild("tip");
|
||||||
tailFins = tree.getChild("fins");
|
tailFins = tailTip.getChild("fins");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -28,6 +28,14 @@ public class SeaponyTail implements IPart, MsonModel {
|
||||||
tailBase.pitch = MathHelper.HALF_PI + rotation;
|
tailBase.pitch = MathHelper.HALF_PI + rotation;
|
||||||
tailTip.pitch = rotation;
|
tailTip.pitch = rotation;
|
||||||
tailFins.pitch = rotation - MathHelper.HALF_PI;
|
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
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue