diff --git a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java index 0e691157..ead53ac1 100644 --- a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java +++ b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java @@ -120,7 +120,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P swingItem(entity); if (isCrouching()) { - adjustBody(BODY_ROTATE_ANGLE_X_SNEAK, BODY_RP_Y_SNEAK, BODY_RP_Z_SNEAK); + adjustBody(BODY_ROT_X_SNEAK, BODY_RP_Y_SNEAK, BODY_RP_Z_SNEAK); sneakLegs(); setHead(0, 6, -2); } else if (isRiding) { @@ -138,7 +138,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P bipedLeftArm.rotateAngleZ = -PI * 0.06f; bipedRightArm.rotateAngleZ = PI * 0.06f; } else { - adjustBody(BODY_ROTATE_ANGLE_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK); + adjustBody(BODY_ROT_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK); bipedRightLeg.rotationPointY = FRONT_LEG_RP_Y_NOTSNEAK; bipedLeftLeg.rotationPointY = FRONT_LEG_RP_Y_NOTSNEAK; @@ -163,8 +163,8 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P } protected void adjustBodyRiding() { - adjustBodyComponents(BODY_ROTATE_ANGLE_X_RIDING, BODY_RP_Y_RIDING, BODY_RP_Z_RIDING); - adjustNeck(BODY_ROTATE_ANGLE_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK); + adjustBodyComponents(BODY_ROT_X_RIDING, BODY_RP_Y_RIDING, BODY_RP_Z_RIDING); + adjustNeck(BODY_ROT_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK); setHead(0, 0, 0); } @@ -495,8 +495,8 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P * Aligns legs to a sneaky position. */ protected void sneakLegs() { - bipedRightArm.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; - bipedLeftArm.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; + bipedRightArm.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ; + bipedLeftArm.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ; bipedLeftLeg.rotationPointY = bipedRightLeg.rotationPointY = FRONT_LEG_RP_Y_SNEAK; } diff --git a/src/main/java/com/minelittlepony/model/PonyModelConstants.java b/src/main/java/com/minelittlepony/model/PonyModelConstants.java index 432be781..344c5e8d 100644 --- a/src/main/java/com/minelittlepony/model/PonyModelConstants.java +++ b/src/main/java/com/minelittlepony/model/PonyModelConstants.java @@ -13,9 +13,9 @@ public interface PonyModelConstants { NECK_CENTRE_Y = BODY_CENTRE_Y - 6.8F, NECK_CENTRE_Z = BODY_CENTRE_Z - 8.8F, - BODY_ROTATE_ANGLE_X_NOTSNEAK = 0, - BODY_ROTATE_ANGLE_X_SNEAK = 0.4F, - BODY_ROTATE_ANGLE_X_RIDING = PI * 3.8F, + BODY_ROT_X_NOTSNEAK = 0, + BODY_ROT_X_SNEAK = 0.4F, + BODY_ROT_X_RIDING = PI * 3.8F, BODY_RP_Y_NOTSNEAK = 0, BODY_RP_Y_SNEAK = 7, @@ -40,24 +40,26 @@ public interface PonyModelConstants { HORN_Y = HEAD_CENTRE_Y - 10, HORN_Z = HEAD_CENTRE_Z - 1.5F, - LEFT_WING_EXT_RP_X = 4.5F, - LEFT_WING_EXT_RP_Y = 5.3F, - LEFT_WING_EXT_RP_Z = 6, + EXT_WING_RP_X = 4.5F, + EXT_WING_RP_Y = 5.3F, + EXT_WING_RP_Z = 6, - LEFT_WING_ROTATE_ANGLE_Z_SNEAK = 4, + WING_ROT_Z_SNEAK = 4, ROTATE_270 = 4.712F, ROTATE_90 = 1.571F, - SNEAK_LEG_X_ROTATION_ADJUSTMENT = 0.4F, + LEG_ROT_X_SNEAK_ADJ = 0.4F, TAIL_RP_X = 0, TAIL_RP_Y = 0, - TAIL_RP_Z = 0, TAIL_RP_Z_NOTSNEAK = 14, TAIL_RP_Z_SNEAK = 15, + TAIL_RP_Y_RIDING = 3, + TAIL_RP_Z_RIDING = 13, + THIRDP_ARM_CENTRE_X = 0, THIRDP_ARM_CENTRE_Y = 4, diff --git a/src/main/java/com/minelittlepony/model/capabilities/IModelPegasus.java b/src/main/java/com/minelittlepony/model/capabilities/IModelPegasus.java index 9161c523..2410c7de 100644 --- a/src/main/java/com/minelittlepony/model/capabilities/IModelPegasus.java +++ b/src/main/java/com/minelittlepony/model/capabilities/IModelPegasus.java @@ -1,6 +1,6 @@ package com.minelittlepony.model.capabilities; -import static com.minelittlepony.model.PonyModelConstants.LEFT_WING_ROTATE_ANGLE_Z_SNEAK; +import static com.minelittlepony.model.PonyModelConstants.WING_ROT_Z_SNEAK; import static com.minelittlepony.model.PonyModelConstants.ROTATE_270; import net.minecraft.util.math.MathHelper; @@ -22,7 +22,7 @@ public interface IModelPegasus extends IModel { if (isFlying()) { return MathHelper.sin(ticks * 0.536f) + ROTATE_270 + 0.4f; } - return LEFT_WING_ROTATE_ANGLE_Z_SNEAK; + return WING_ROT_Z_SNEAK; } } diff --git a/src/main/java/com/minelittlepony/model/components/ModelWing.java b/src/main/java/com/minelittlepony/model/components/ModelWing.java index c5aacc25..e1b7dec2 100644 --- a/src/main/java/com/minelittlepony/model/components/ModelWing.java +++ b/src/main/java/com/minelittlepony/model/components/ModelWing.java @@ -38,7 +38,7 @@ public class ModelWing { private void addFeathers(boolean right, boolean l, float rotationPointY, float scale) { float r = right ? -1 : 1; - extended.around(r * LEFT_WING_EXT_RP_X, LEFT_WING_EXT_RP_Y + rotationPointY, LEFT_WING_EXT_RP_Z) + extended.around(r * EXT_WING_RP_X, EXT_WING_RP_Y + rotationPointY, EXT_WING_RP_Z) .rotateAngleY = r * 3; addFeather(0, l, 6, 0, 8, scale + 0.1F); addFeather(1, l, -1, -0.3F, 8, scale + 0.1F) .rotateAngleX = -0.85F; diff --git a/src/main/java/com/minelittlepony/model/components/PonyTail.java b/src/main/java/com/minelittlepony/model/components/PonyTail.java index 09f0cf92..ebf8beb9 100644 --- a/src/main/java/com/minelittlepony/model/components/PonyTail.java +++ b/src/main/java/com/minelittlepony/model/components/PonyTail.java @@ -36,9 +36,9 @@ public class PonyTail extends PlaneRenderer implements IModelPart { if (theModel.isCrouching() && !rainboom) { rotateSneak(); - } else if (theModel.isRiding) { - rotationPointZ = 13; - rotationPointY = 3; + } else if (theModel.isRiding()) { + rotationPointZ = TAIL_RP_Z_RIDING; + rotationPointY = TAIL_RP_Y_RIDING; rotateAngleX = PI / 5; } else { setRotationPoint(TAIL_RP_X, TAIL_RP_Y, TAIL_RP_Z_NOTSNEAK); @@ -46,9 +46,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart { rotateAngleX = ROTATE_90 + MathHelper.sin(move) / 10; } else { rotateAngleX = swing / 2; - } - if (!rainboom) { swingX(ticks); } } @@ -69,7 +67,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart { private void rotateSneak() { setRotationPoint(TAIL_RP_X, TAIL_RP_Y, TAIL_RP_Z_SNEAK); - rotateAngleX = -BODY_ROTATE_ANGLE_X_SNEAK + 0.1F; + rotateAngleX = -BODY_ROT_X_SNEAK + 0.1F; } @Override @@ -98,7 +96,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart { public void init(float yOffset, float stretch) { int texX = (index % 2) * 4; - around(TAIL_RP_X, TAIL_RP_Y + yOffset, TAIL_RP_Z); + around(TAIL_RP_X, TAIL_RP_Y + yOffset, 0); if (index == 0) { tex(32, 0).addTopPlane(-2, 0, 2, 4, 4, stretch); diff --git a/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java b/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java index 0d93f856..fd8d9f04 100644 --- a/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java +++ b/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java @@ -128,8 +128,8 @@ public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn { @Override protected void sneakLegs() { super.sneakLegs(); - unicornArmRight.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; - unicornArmLeft.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; + unicornArmRight.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ; + unicornArmLeft.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ; } @Override diff --git a/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java b/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java index 2d5c17c7..18b2dc1c 100644 --- a/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java +++ b/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java @@ -147,6 +147,6 @@ public class ModelEnderStallion extends ModelSkeletonPony { @Override public float getWingRotationFactor(float ticks) { - return MathHelper.sin(ticks) + LEFT_WING_ROTATE_ANGLE_Z_SNEAK; + return MathHelper.sin(ticks) + WING_ROT_Z_SNEAK; } }