mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Normalize constant names
This commit is contained in:
parent
d71aa20ced
commit
e18db6bb19
7 changed files with 28 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue