Normalize constant names

This commit is contained in:
Sollace 2018-08-18 00:24:58 +02:00
parent d71aa20ced
commit e18db6bb19
7 changed files with 28 additions and 28 deletions

View file

@ -120,7 +120,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P
swingItem(entity); swingItem(entity);
if (isCrouching()) { 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(); sneakLegs();
setHead(0, 6, -2); setHead(0, 6, -2);
} else if (isRiding) { } else if (isRiding) {
@ -138,7 +138,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P
bipedLeftArm.rotateAngleZ = -PI * 0.06f; bipedLeftArm.rotateAngleZ = -PI * 0.06f;
bipedRightArm.rotateAngleZ = PI * 0.06f; bipedRightArm.rotateAngleZ = PI * 0.06f;
} else { } 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; bipedRightLeg.rotationPointY = FRONT_LEG_RP_Y_NOTSNEAK;
bipedLeftLeg.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() { protected void adjustBodyRiding() {
adjustBodyComponents(BODY_ROTATE_ANGLE_X_RIDING, BODY_RP_Y_RIDING, BODY_RP_Z_RIDING); adjustBodyComponents(BODY_ROT_X_RIDING, BODY_RP_Y_RIDING, BODY_RP_Z_RIDING);
adjustNeck(BODY_ROTATE_ANGLE_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK); adjustNeck(BODY_ROT_X_NOTSNEAK, BODY_RP_Y_NOTSNEAK, BODY_RP_Z_NOTSNEAK);
setHead(0, 0, 0); setHead(0, 0, 0);
} }
@ -495,8 +495,8 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P
* Aligns legs to a sneaky position. * Aligns legs to a sneaky position.
*/ */
protected void sneakLegs() { protected void sneakLegs() {
bipedRightArm.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; bipedRightArm.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ;
bipedLeftArm.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; bipedLeftArm.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ;
bipedLeftLeg.rotationPointY = bipedRightLeg.rotationPointY = FRONT_LEG_RP_Y_SNEAK; bipedLeftLeg.rotationPointY = bipedRightLeg.rotationPointY = FRONT_LEG_RP_Y_SNEAK;
} }

View file

@ -13,9 +13,9 @@ public interface PonyModelConstants {
NECK_CENTRE_Y = BODY_CENTRE_Y - 6.8F, NECK_CENTRE_Y = BODY_CENTRE_Y - 6.8F,
NECK_CENTRE_Z = BODY_CENTRE_Z - 8.8F, NECK_CENTRE_Z = BODY_CENTRE_Z - 8.8F,
BODY_ROTATE_ANGLE_X_NOTSNEAK = 0, BODY_ROT_X_NOTSNEAK = 0,
BODY_ROTATE_ANGLE_X_SNEAK = 0.4F, BODY_ROT_X_SNEAK = 0.4F,
BODY_ROTATE_ANGLE_X_RIDING = PI * 3.8F, BODY_ROT_X_RIDING = PI * 3.8F,
BODY_RP_Y_NOTSNEAK = 0, BODY_RP_Y_NOTSNEAK = 0,
BODY_RP_Y_SNEAK = 7, BODY_RP_Y_SNEAK = 7,
@ -40,24 +40,26 @@ public interface PonyModelConstants {
HORN_Y = HEAD_CENTRE_Y - 10, HORN_Y = HEAD_CENTRE_Y - 10,
HORN_Z = HEAD_CENTRE_Z - 1.5F, HORN_Z = HEAD_CENTRE_Z - 1.5F,
LEFT_WING_EXT_RP_X = 4.5F, EXT_WING_RP_X = 4.5F,
LEFT_WING_EXT_RP_Y = 5.3F, EXT_WING_RP_Y = 5.3F,
LEFT_WING_EXT_RP_Z = 6, EXT_WING_RP_Z = 6,
LEFT_WING_ROTATE_ANGLE_Z_SNEAK = 4, WING_ROT_Z_SNEAK = 4,
ROTATE_270 = 4.712F, ROTATE_270 = 4.712F,
ROTATE_90 = 1.571F, ROTATE_90 = 1.571F,
SNEAK_LEG_X_ROTATION_ADJUSTMENT = 0.4F, LEG_ROT_X_SNEAK_ADJ = 0.4F,
TAIL_RP_X = 0, TAIL_RP_X = 0,
TAIL_RP_Y = 0, TAIL_RP_Y = 0,
TAIL_RP_Z = 0,
TAIL_RP_Z_NOTSNEAK = 14, TAIL_RP_Z_NOTSNEAK = 14,
TAIL_RP_Z_SNEAK = 15, TAIL_RP_Z_SNEAK = 15,
TAIL_RP_Y_RIDING = 3,
TAIL_RP_Z_RIDING = 13,
THIRDP_ARM_CENTRE_X = 0, THIRDP_ARM_CENTRE_X = 0,
THIRDP_ARM_CENTRE_Y = 4, THIRDP_ARM_CENTRE_Y = 4,

View file

@ -1,6 +1,6 @@
package com.minelittlepony.model.capabilities; 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 static com.minelittlepony.model.PonyModelConstants.ROTATE_270;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
@ -22,7 +22,7 @@ public interface IModelPegasus extends IModel {
if (isFlying()) { if (isFlying()) {
return MathHelper.sin(ticks * 0.536f) + ROTATE_270 + 0.4f; return MathHelper.sin(ticks * 0.536f) + ROTATE_270 + 0.4f;
} }
return LEFT_WING_ROTATE_ANGLE_Z_SNEAK; return WING_ROT_Z_SNEAK;
} }
} }

View file

@ -38,7 +38,7 @@ public class ModelWing {
private void addFeathers(boolean right, boolean l, float rotationPointY, float scale) { private void addFeathers(boolean right, boolean l, float rotationPointY, float scale) {
float r = right ? -1 : 1; 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; .rotateAngleY = r * 3;
addFeather(0, l, 6, 0, 8, scale + 0.1F); addFeather(0, l, 6, 0, 8, scale + 0.1F);
addFeather(1, l, -1, -0.3F, 8, scale + 0.1F) .rotateAngleX = -0.85F; addFeather(1, l, -1, -0.3F, 8, scale + 0.1F) .rotateAngleX = -0.85F;

View file

@ -36,9 +36,9 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
if (theModel.isCrouching() && !rainboom) { if (theModel.isCrouching() && !rainboom) {
rotateSneak(); rotateSneak();
} else if (theModel.isRiding) { } else if (theModel.isRiding()) {
rotationPointZ = 13; rotationPointZ = TAIL_RP_Z_RIDING;
rotationPointY = 3; rotationPointY = TAIL_RP_Y_RIDING;
rotateAngleX = PI / 5; rotateAngleX = PI / 5;
} else { } else {
setRotationPoint(TAIL_RP_X, TAIL_RP_Y, TAIL_RP_Z_NOTSNEAK); 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; rotateAngleX = ROTATE_90 + MathHelper.sin(move) / 10;
} else { } else {
rotateAngleX = swing / 2; rotateAngleX = swing / 2;
}
if (!rainboom) {
swingX(ticks); swingX(ticks);
} }
} }
@ -69,7 +67,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
private void rotateSneak() { private void rotateSneak() {
setRotationPoint(TAIL_RP_X, TAIL_RP_Y, TAIL_RP_Z_SNEAK); 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 @Override
@ -98,7 +96,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
public void init(float yOffset, float stretch) { public void init(float yOffset, float stretch) {
int texX = (index % 2) * 4; 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) { if (index == 0) {
tex(32, 0).addTopPlane(-2, 0, 2, 4, 4, stretch); tex(32, 0).addTopPlane(-2, 0, 2, 4, 4, stretch);

View file

@ -128,8 +128,8 @@ public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn {
@Override @Override
protected void sneakLegs() { protected void sneakLegs() {
super.sneakLegs(); super.sneakLegs();
unicornArmRight.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; unicornArmRight.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ;
unicornArmLeft.rotateAngleX -= SNEAK_LEG_X_ROTATION_ADJUSTMENT; unicornArmLeft.rotateAngleX -= LEG_ROT_X_SNEAK_ADJ;
} }
@Override @Override

View file

@ -147,6 +147,6 @@ public class ModelEnderStallion extends ModelSkeletonPony {
@Override @Override
public float getWingRotationFactor(float ticks) { public float getWingRotationFactor(float ticks) {
return MathHelper.sin(ticks) + LEFT_WING_ROTATE_ANGLE_Z_SNEAK; return MathHelper.sin(ticks) + WING_ROT_Z_SNEAK;
} }
} }