The problem childs

This commit is contained in:
Sollace 2018-08-01 12:38:15 +02:00
parent 65a5fc230c
commit bee8d0556d
19 changed files with 182 additions and 168 deletions

View file

@ -89,7 +89,8 @@ public class GuiSkinsMineLP extends GuiSkins {
text = "minelp.mode.wet"; text = "minelp.mode.wet";
} }
this.drawHoveringText(I18n.format(text), mouseX, y); this.drawHoveringText(I18n.format(text), mouseX, y);
}; }
;
} }
@Override @Override

View file

@ -70,7 +70,8 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
} }
/** /**
* Checks flying and speed conditions and sets rainboom to true if we're a species with wings and is going faaast. * Checks flying and speed conditions and sets rainboom to true if we're a species with wings and is
* going faaast.
*/ */
protected void checkRainboom(Entity entity, float swing) { protected void checkRainboom(Entity entity, float swing) {
rainboom = canFly() || isElytraFlying(); rainboom = canFly() || isElytraFlying();
@ -90,12 +91,15 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Sets the model's various rotation angles. * Sets the model's various rotation angles.
* *
* @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to calculate step amount. * @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds
* to calculate step amount.
* @param swing Degree to which each 'limb' swings. * @param swing Degree to which each 'limb' swings.
* @param ticks Total whole and partial ticks since the entity's existance. Used in animations together with {@code swing} and {@code move}. * @param ticks Total whole and partial ticks since the entity's existance. Used in animations
* together with {@code swing} and {@code move}.
* @param headYaw Horizontal head motion in radians. * @param headYaw Horizontal head motion in radians.
* @param headPitch Vertical head motion in radians. * @param headPitch Vertical head motion in radians.
* @param scale Scaling factor used to render this model. Determined by the return value of {@link RenderLivingBase.prepareScale}. Usually {@code 0.0625F}. * @param scale Scaling factor used to render this model. Determined by the return value of
* {@link RenderLivingBase.prepareScale}. Usually {@code 0.0625F}.
* @param entity The entity we're being called for. * @param entity The entity we're being called for.
*/ */
@Override @Override
@ -107,8 +111,8 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
float headRotateAngleY = isSleeping ? 1.4f : headYaw / 57.29578F; float headRotateAngleY = isSleeping ? 1.4f : headYaw / 57.29578F;
float headRotateAngleX = isSleeping ? 0.1f : headPitch / 57.29578F; float headRotateAngleX = isSleeping ? 0.1f : headPitch / 57.29578F;
headRotateAngleX = Math.min(headRotateAngleX, (float) (0.5f - Math.toRadians(motionPitch))); headRotateAngleX = Math.min(headRotateAngleX, (float)(0.5f - Math.toRadians(motionPitch)));
headRotateAngleX = Math.max(headRotateAngleX, (float) (-1.25f - Math.toRadians(motionPitch))); headRotateAngleX = Math.max(headRotateAngleX, (float)(-1.25f - Math.toRadians(motionPitch)));
updateHeadRotation(headRotateAngleX, headRotateAngleY); updateHeadRotation(headRotateAngleX, headRotateAngleY);
@ -134,7 +138,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
bipedRightLeg.rotationPointZ = 15; bipedRightLeg.rotationPointZ = 15;
bipedRightLeg.rotationPointY = 10; bipedRightLeg.rotationPointY = 10;
bipedRightLeg.rotateAngleX = -PI / 4; bipedRightLeg.rotateAngleX = -PI / 4;
bipedRightLeg.rotateAngleY = PI / 5; bipedRightLeg.rotateAngleY = PI / 5;
bipedLeftArm.rotateAngleZ = -PI * 0.06f; bipedLeftArm.rotateAngleZ = -PI * 0.06f;
bipedRightArm.rotateAngleZ = PI * 0.06f; bipedRightArm.rotateAngleZ = PI * 0.06f;
@ -174,10 +178,12 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Sets the model's various rotation angles. * Sets the model's various rotation angles.
* *
* @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to calculate step amount. * @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds
* to calculate step amount.
* @param swing Degree to which each 'limb' swings. * @param swing Degree to which each 'limb' swings.
* @param bodySwing Horizontal (Y) body rotation. * @param bodySwing Horizontal (Y) body rotation.
* @param ticks Total whole and partial ticks since the entity's existance. Used in animations together with {@code swing} and {@code move}. * @param ticks Total whole and partial ticks since the entity's existance. Used in animations
* together with {@code swing} and {@code move}.
*/ */
protected void shakeBody(float move, float swing, float bodySwing, float ticks) { protected void shakeBody(float move, float swing, float bodySwing, float ticks) {
tail.setRotationAndAngles(isSwimming || rainboom, move, swing, bodySwing * 5, ticks); tail.setRotationAndAngles(isSwimming || rainboom, move, swing, bodySwing * 5, ticks);
@ -211,8 +217,8 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Called to update the head rotation. * Called to update the head rotation.
* *
* @param x New rotation X * @param x New rotation X
* @param y New rotation Y * @param y New rotation Y
*/ */
protected void updateHeadRotation(float x, float y) { protected void updateHeadRotation(float x, float y) {
bipedHeadwear.rotateAngleY = bipedHead.rotateAngleY = y; bipedHeadwear.rotateAngleY = bipedHead.rotateAngleY = y;
@ -266,19 +272,21 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Rotates legs in quopy fashion whilst swimming. * Rotates legs in quopy fashion whilst swimming.
* *
* @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to calculate step amount. * @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to
* @param swing Degree to which each 'limb' swings. * calculate step amount.
* @param ticks Total whole and partial ticks since the entity's existance. Used in animations together with {@code swing} and {@code move}. * @param swing Degree to which each 'limb' swings.
* @param entity The entity we're being called for. * @param ticks Total whole and partial ticks since the entity's existance. Used in animations
* together with {@code swing} and {@code move}.
* @param entity The entity we're being called for.
* *
*/ */
protected void rotateLegsSwimming(float move, float swing, float ticks, Entity entity) { protected void rotateLegsSwimming(float move, float swing, float ticks, Entity entity) {
float forward = ROTATE_270 - ROTATE_90/3; float forward = ROTATE_270 - ROTATE_90 / 3;
float down = ROTATE_90; float down = ROTATE_90;
float leftX = down + MathHelper.sin(move / 3 + 2*PI/3) / 2; float leftX = down + MathHelper.sin(move / 3 + 2 * PI / 3) / 2;
float leftY = -forward - MathHelper.sin(move / 3 + 2*PI/3); float leftY = -forward - MathHelper.sin(move / 3 + 2 * PI / 3);
float rightX = down + MathHelper.sin(move / 3) / 2; float rightX = down + MathHelper.sin(move / 3) / 2;
@ -299,10 +307,12 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Rotates legs in quopy fashion whilst flying. * Rotates legs in quopy fashion whilst flying.
* *
* @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to calculate step amount. * @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to
* @param swing Degree to which each 'limb' swings. * calculate step amount.
* @param ticks Total whole and partial ticks since the entity's existance. Used in animations together with {@code swing} and {@code move}. * @param swing Degree to which each 'limb' swings.
* @param entity The entity we're being called for. * @param ticks Total whole and partial ticks since the entity's existance. Used in animations
* together with {@code swing} and {@code move}.
* @param entity The entity we're being called for.
* *
*/ */
protected void rotateLegsInFlight(float move, float swing, float ticks, Entity entity) { protected void rotateLegsInFlight(float move, float swing, float ticks, Entity entity) {
@ -325,22 +335,24 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Rotates legs in quopy fashion for walking. * Rotates legs in quopy fashion for walking.
* *
* @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to calculate step amount. * @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to
* @param swing Degree to which each 'limb' swings. * calculate step amount.
* @param ticks Total whole and partial ticks since the entity's existance. Used in animations together with {@code swing} and {@code move}. * @param swing Degree to which each 'limb' swings.
* @param entity The entity we're being called for. * @param ticks Total whole and partial ticks since the entity's existance. Used in animations
* together with {@code swing} and {@code move}.
* @param entity The entity we're being called for.
* *
*/ */
protected void rotateLegsOnGround(float move, float swing, float ticks, Entity entity) { protected void rotateLegsOnGround(float move, float swing, float ticks, Entity entity) {
float angle = PI * (float) Math.pow(swing, 16); float angle = PI * (float)Math.pow(swing, 16);
float baseRotation = move * 0.6662F; // magic number ahoy float baseRotation = move * 0.6662F; // magic number ahoy
float scale = swing / 4; float scale = swing / 4;
bipedLeftArm.rotateAngleX = MathHelper.cos(baseRotation + angle) * scale; bipedLeftArm.rotateAngleX = MathHelper.cos(baseRotation + angle) * scale;
bipedRightArm.rotateAngleX = MathHelper.cos(baseRotation + PI + angle / 2) * scale; bipedRightArm.rotateAngleX = MathHelper.cos(baseRotation + PI + angle / 2) * scale;
bipedLeftLeg.rotateAngleX = MathHelper.cos(baseRotation + PI - angle * 0.4f) * scale; bipedLeftLeg.rotateAngleX = MathHelper.cos(baseRotation + PI - angle * 0.4f) * scale;
bipedRightLeg.rotateAngleX = MathHelper.cos(baseRotation + angle / 5) * scale; bipedRightLeg.rotateAngleX = MathHelper.cos(baseRotation + angle / 5) * scale;
bipedLeftArm.rotateAngleY = 0; bipedLeftArm.rotateAngleY = 0;
@ -382,7 +394,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
* @param arm The arm model to align * @param arm The arm model to align
* @param pose The post to align to * @param pose The post to align to
* @param both True if we have something in both hands * @param both True if we have something in both hands
* @param swing Degree to which each 'limb' swings. * @param swing Degree to which each 'limb' swings.
*/ */
protected void alignArmForAction(ModelRenderer arm, ArmPose pose, ArmPose complement, boolean both, float swing, float reflect) { protected void alignArmForAction(ModelRenderer arm, ArmPose pose, ArmPose complement, boolean both, float swing, float reflect) {
switch (pose) { switch (pose) {
@ -391,7 +403,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
if (!isFlying && both) { if (!isFlying && both) {
swag -= (float)Math.pow(swing, 2); swag -= (float)Math.pow(swing, 2);
} }
float mult = 1 - swag/2; float mult = 1 - swag / 2;
arm.rotateAngleX = arm.rotateAngleX * mult - PI / 10 * swag; arm.rotateAngleX = arm.rotateAngleX * mult - PI / 10 * swag;
arm.rotateAngleZ = -reflect * (PI / 15); arm.rotateAngleZ = -reflect * (PI / 15);
if (isSneak) { if (isSneak) {
@ -429,7 +441,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Animates arm swinging. Delegates to the correct arm/leg/limb as neccessary. * Animates arm swinging. Delegates to the correct arm/leg/limb as neccessary.
* *
* @param entity The entity we are being called for. * @param entity The entity we are being called for.
*/ */
protected void swingItem(Entity entity) { protected void swingItem(Entity entity) {
if (swingProgress > 0 && !isSleeping) { if (swingProgress > 0 && !isSleeping) {
@ -442,7 +454,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Animates arm swinging. * Animates arm swinging.
* *
* @param arm The arm to swing * @param arm The arm to swing
*/ */
protected void swingArm(ModelRenderer arm) { protected void swingArm(ModelRenderer arm) {
float swing = 1 - (float)Math.pow(1 - swingProgress, 3); float swing = 1 - (float)Math.pow(1 - swingProgress, 3);
@ -460,7 +472,8 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
/** /**
* Animates the walking animation. * Animates the walking animation.
* *
* @param ticks Total whole and partial ticks since the entity's existance. Used in animations together with {@code swing} and {@code move}. * @param ticks Total whole and partial ticks since the entity's existance. Used in animations
* together with {@code swing} and {@code move}.
*/ */
protected void swingArms(float ticks) { protected void swingArms(float ticks) {
if (isSleeping) { if (isSleeping) {
@ -540,9 +553,9 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
bipedHead = new PonyRenderer(this, 0, 0) bipedHead = new PonyRenderer(this, 0, 0)
.offset(HEAD_CENTRE_X, HEAD_CENTRE_Y, HEAD_CENTRE_Z) .offset(HEAD_CENTRE_X, HEAD_CENTRE_Y, HEAD_CENTRE_Z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z - 2) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z - 2)
.box(-4, -4, -4, 8, 8, 8, stretch) .box(-4, -4, -4, 8, 8, 8, stretch)
.tex(12, 16).box(-4, -6, 1, 2, 2, 2, stretch) .tex(12, 16).box(-4, -6, 1, 2, 2, 2, stretch)
.flip().box( 2, -6, 1, 2, 2, 2, stretch); .flip().box(2, -6, 1, 2, 2, 2, stretch);
bipedHeadwear = new PonyRenderer(this, 32, 0) bipedHeadwear = new PonyRenderer(this, 32, 0)
.offset(HEAD_CENTRE_X, HEAD_CENTRE_Y, HEAD_CENTRE_Z) .offset(HEAD_CENTRE_X, HEAD_CENTRE_Y, HEAD_CENTRE_Z)
@ -576,24 +589,24 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
upperTorso = new PlaneRenderer(this, 24, 0); upperTorso = new PlaneRenderer(this, 24, 0);
upperTorso.offset(BODY_CENTRE_X, BODY_CENTRE_Y, BODY_CENTRE_Z) upperTorso.offset(BODY_CENTRE_X, BODY_CENTRE_Y, BODY_CENTRE_Z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.tex(24, 0) .addEastPlane( 4, -4, -4, 8, 8, stretch) .tex(24, 0).addEastPlane(4, -4, -4, 8, 8, stretch)
.tex(4, 0) .addEastPlane( 4, -4, 4, 8, 4, stretch) .tex(4, 0).addEastPlane(4, -4, 4, 8, 4, stretch)
.tex(56, 0) .addBottomPlane(-4, 4, -4, 8, 8, stretch) .tex(56, 0).addBottomPlane(-4, 4, -4, 8, 8, stretch)
.tex(36, 16) .addBackPlane(-4, -4, 8, 8, 4, stretch) .tex(36, 16).addBackPlane(-4, -4, 8, 8, 4, stretch)
.addBackPlane(-4, 0, 8, 8, 4, stretch) .addBackPlane(-4, 0, 8, 8, 4, stretch)
.addBottomPlane(-4, 4, 4, 8, 4, stretch) .addBottomPlane(-4, 4, 4, 8, 4, stretch)
.flipZ().tex(32, 20).addTopPlane(-4, -4, -4, 8, 12, stretch) .flipZ().tex(32, 20).addTopPlane(-4, -4, -4, 8, 12, stretch)
.tex(24, 0).addWestPlane(-4, -4, -4, 8, 8, stretch) .tex(24, 0).addWestPlane(-4, -4, -4, 8, 8, stretch)
.tex(4, 0) .addWestPlane(-4, -4, 4, 8, 4, stretch) .tex(4, 0).addWestPlane(-4, -4, 4, 8, 4, stretch)
// Tail stub // Tail stub
.child(0) .child(0)
.tex(32, 0).addTopPlane(-1, 2, 2, 2, 6, stretch) .tex(32, 0).addTopPlane(-1, 2, 2, 2, 6, stretch)
.addBottomPlane(-1, 4, 2, 2, 6, stretch) .addBottomPlane(-1, 4, 2, 2, 6, stretch)
.addEastPlane( 1, 2, 2, 2, 6, stretch) .addEastPlane(1, 2, 2, 2, 6, stretch)
.addBackPlane(-1, 2, 8, 2, 2, stretch) .addBackPlane(-1, 2, 8, 2, 2, stretch)
.flipZ().addWestPlane(-1, 2, 2, 2, 6, stretch) .flipZ().addWestPlane(-1, 2, 2, 2, 6, stretch)
.rotate(0.5F, 0, 0); .rotate(0.5F, 0, 0);
neck = new PlaneRenderer(this, 0, 16) neck = new PlaneRenderer(this, 0, 16)
.at(NECK_CENTRE_X, NECK_CENTRE_Y, NECK_CENTRE_Z) .at(NECK_CENTRE_X, NECK_CENTRE_Y, NECK_CENTRE_Z)
@ -634,16 +647,16 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
float armY = THIRDP_ARM_CENTRE_Y; float armY = THIRDP_ARM_CENTRE_Y;
float armZ = BODY_CENTRE_Z / 2 - 1 - armDepth; float armZ = BODY_CENTRE_Z / 2 - 1 - armDepth;
bipedLeftArm .addBox(armX, armY, armZ, armWidth, 12, armDepth, stretch); bipedLeftArm.addBox(armX, armY, armZ, armWidth, 12, armDepth, stretch);
bipedRightArm.addBox(armX - armWidth, armY, armZ, armWidth, 12, armDepth, stretch); bipedRightArm.addBox(armX - armWidth, armY, armZ, armWidth, 12, armDepth, stretch);
bipedLeftLeg .addBox(armX, armY, armZ, armWidth, 12, armDepth, stretch); bipedLeftLeg.addBox(armX, armY, armZ, armWidth, 12, armDepth, stretch);
bipedRightLeg.addBox(armX - armWidth, armY, armZ, armWidth, 12, armDepth, stretch); bipedRightLeg.addBox(armX - armWidth, armY, armZ, armWidth, 12, armDepth, stretch);
bipedLeftArm .setRotationPoint( rarmX, yOffset + rarmY, 0); bipedLeftArm.setRotationPoint(rarmX, yOffset + rarmY, 0);
bipedRightArm.setRotationPoint(-rarmX, yOffset + rarmY, 0); bipedRightArm.setRotationPoint(-rarmX, yOffset + rarmY, 0);
bipedLeftLeg .setRotationPoint( rarmX, yOffset, 0); bipedLeftLeg.setRotationPoint(rarmX, yOffset, 0);
bipedRightLeg.setRotationPoint(-rarmX, yOffset, 0); bipedRightLeg.setRotationPoint(-rarmX, yOffset, 0);
bipedLeftArmwear.addBox(armX, armY, armZ, armWidth, 12, armDepth, stretch + 0.25f); bipedLeftArmwear.addBox(armX, armY, armZ, armWidth, 12, armDepth, stretch + 0.25f);
@ -747,11 +760,13 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
} }
switch (getMetadata().getSize()) { switch (getMetadata().getSize()) {
case NORMAL: return 0.4F; case NORMAL:
return 0.4F;
case FOAL: case FOAL:
case TALL: case TALL:
case LARGE: case LARGE:
default: return 0.25F; default:
return 0.25F;
} }
} }
@ -759,12 +774,15 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
* Sets the model's various rotation angles. * Sets the model's various rotation angles.
* *
* @param entity The entity we're being called for. * @param entity The entity we're being called for.
* @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds to calculate step amount. * @param move Entity motion parameter - i.e. velocity in no specific direction used in bipeds
* to calculate step amount.
* @param swing Degree to which each 'limb' swings. * @param swing Degree to which each 'limb' swings.
* @param ticks Total whole and partial ticks since the entity's existance. Used in animations together with {@code swing} and {@code move}. * @param ticks Total whole and partial ticks since the entity's existance. Used in animations
* together with {@code swing} and {@code move}.
* @param headYaw Horizontal head motion in radians. * @param headYaw Horizontal head motion in radians.
* @param headPitch Vertical head motion in radians. * @param headPitch Vertical head motion in radians.
* @param scale Scaling factor used to render this model. Determined by the return value of {@link RenderLivingBase.prepareScale}. Usually {@code 0.0625F}. * @param scale Scaling factor used to render this model. Determined by the return value of
* {@link RenderLivingBase.prepareScale}. Usually {@code 0.0625F}.
*/ */
@Override @Override
public void render(Entity entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) { public void render(Entity entity, float move, float swing, float ticks, float headYaw, float headPitch, float scale) {
@ -868,7 +886,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
public void setModelAttributes(ModelBase model) { public void setModelAttributes(ModelBase model) {
super.setModelAttributes(model); super.setModelAttributes(model);
if (model instanceof AbstractPonyModel) { if (model instanceof AbstractPonyModel) {
AbstractPonyModel pony = (AbstractPonyModel) model; AbstractPonyModel pony = (AbstractPonyModel)model;
isFlying = pony.isFlying; isFlying = pony.isFlying;
isElytraFlying = pony.isElytraFlying; isElytraFlying = pony.isElytraFlying;
isSwimming = pony.isSwimming; isSwimming = pony.isSwimming;

View file

@ -64,8 +64,8 @@ public class ModelPonyArmor extends AbstractPonyModel implements IModelArmor {
protected void initHead(float yOffset, float stretch) { protected void initHead(float yOffset, float stretch) {
super.initHead(yOffset, stretch * 1.1F); super.initHead(yOffset, stretch * 1.1F);
((PonyRenderer)bipedHead).child() ((PonyRenderer)bipedHead).child()
.tex(0, 4).box( 2, -6, 1, 2, 2, 2, stretch / 2) .tex(0, 4).box(2, -6, 1, 2, 2, 2, stretch / 2)
.box(-4, -6, 1, 2, 2, 2, stretch / 2); .box(-4, -6, 1, 2, 2, 2, stretch / 2);
} }
@Override @Override
@ -74,7 +74,7 @@ public class ModelPonyArmor extends AbstractPonyModel implements IModelArmor {
flankGuard = new PonyRenderer(this, 0, 0) flankGuard = new PonyRenderer(this, 0, 0)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.box(-4, 4, 6, 8, 8, 8, stretch); .box(-4, 4, 6, 8, 8, 8, stretch);
saddle = new PonyRenderer(this, 16, 8) saddle = new PonyRenderer(this, 16, 8)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.box(-4, 4, -2, 8, 8, 16, stretch); .box(-4, 4, -2, 8, 8, 16, stretch);
@ -111,7 +111,7 @@ public class ModelPonyArmor extends AbstractPonyModel implements IModelArmor {
@Override @Override
public void showLegs(boolean isPony) { public void showLegs(boolean isPony) {
bipedBody.showModel = true; bipedBody.showModel = true;
} }
@Override @Override

View file

@ -30,7 +30,7 @@ public class ModelPonyHead extends ModelHumanoidHead implements ICapitated {
ears = new PonyRenderer(this, 0, 0) ears = new PonyRenderer(this, 0, 0)
.offset(0, -3, 2).around(0, 0, -2) .offset(0, -3, 2).around(0, 0, -2)
.tex(12, 16).box(-4, -6, 1, 2, 2, 2, 0) .tex(12, 16).box(-4, -6, 1, 2, 2, 2, 0)
.flip().box( 2, -6, 1, 2, 2, 2, 0); .flip().box(2, -6, 1, 2, 2, 2, 0);
skeletonHead.addChild(ears); skeletonHead.addChild(ears);
} }

View file

@ -31,21 +31,19 @@ public class ModelWing {
folded.around(HEAD_RP_X, WING_FOLDED_RP_Y + y, WING_FOLDED_RP_Z) folded.around(HEAD_RP_X, WING_FOLDED_RP_Y + y, WING_FOLDED_RP_Z)
.box(x, 5, 2, 2, 6, 2, scale) .box(x, 5, 2, 2, 6, 2, scale)
.box(x, 5, 4, 2, 8, 2, scale) .box(x, 5, 4, 2, 8, 2, scale)
.box(x, 5, 6, 2, 6, 2, scale) .box(x, 5, 6, 2, 6, 2, scale).rotateAngleX = ROTATE_90;
.rotateAngleX = ROTATE_90;
} }
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 * LEFT_WING_EXT_RP_X, LEFT_WING_EXT_RP_Y + rotationPointY, LEFT_WING_EXT_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; addFeather(2, l, 1.8F, 1.3F, 8, scale - 0.1F).rotateAngleX = -0.75F;
addFeather(2, l, 1.8F, 1.3F, 8, scale - 0.1F) .rotateAngleX = -0.75F; addFeather(3, l, 5, 2, 8, scale).rotateAngleX = -0.5F;
addFeather(3, l, 5, 2, 8, scale) .rotateAngleX = -0.5F; addFeather(4, l, 0, -0.2F, 6, scale + 0.3F);
addFeather(4, l, 0, -0.2F, 6, scale + 0.3F); addFeather(5, l, 0, 0, 3, scale + 0.19F).rotateAngleX = -0.85F;
addFeather(5, l, 0, 0, 3, scale + 0.19F).rotateAngleX = -0.85F;
} }
private PonyRenderer addFeather(int i, boolean l, float y, float z, int h, float scale) { private PonyRenderer addFeather(int i, boolean l, float y, float z, int h, float scale) {

View file

@ -50,7 +50,7 @@ public class PegasusWings<T extends AbstractPonyModel & IModelPegasus> implement
if (progress > 0) { if (progress > 0) {
flap = MathHelper.sin(MathHelper.sqrt(progress) * PI * 2); flap = MathHelper.sin(MathHelper.sqrt(progress) * PI * 2);
} else { } else {
float pi = PI * (float) Math.pow(swing, 16); float pi = PI * (float)Math.pow(swing, 16);
float mve = move * 0.6662f; // magic number ahoy (actually 2/3) float mve = move * 0.6662f; // magic number ahoy (actually 2/3)
float srt = swing / 4; float srt = swing / 4;

View file

@ -19,8 +19,8 @@ public class PonyElytra extends ModelBase {
private PonyRenderer leftWing = new PonyRenderer(this, 22, 0); private PonyRenderer leftWing = new PonyRenderer(this, 22, 0);
public PonyElytra() { public PonyElytra() {
leftWing .box(-10, 0, 0, 10, 20, 2, 1); leftWing.box(-10, 0, 0, 10, 20, 2, 1);
rightWing.flip().box( 0, 0, 0, 10, 20, 2, 1); rightWing.flip().box(0, 0, 0, 10, 20, 2, 1);
} }
/** /**
@ -51,12 +51,12 @@ public class PonyElytra extends ModelBase {
float rpY = BODY_RP_Y_NOTSNEAK; float rpY = BODY_RP_Y_NOTSNEAK;
if (entity instanceof EntityLivingBase && ((EntityLivingBase) entity).isElytraFlying()) { if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isElytraFlying()) {
float velY = 1; float velY = 1;
if (entity.motionY < 0) { if (entity.motionY < 0) {
Vec3d motion = new Vec3d(entity.motionX, entity.motionY, entity.motionZ).normalize(); Vec3d motion = new Vec3d(entity.motionX, entity.motionY, entity.motionZ).normalize();
velY = 1 - (float) Math.pow(-motion.y, 1.5); velY = 1 - (float)Math.pow(-motion.y, 1.5);
} }
rotateX = velY * PI * (2 / 3F) + (1 - velY) * rotateX; rotateX = velY * PI * (2 / 3F) + (1 - velY) * rotateX;
@ -72,7 +72,7 @@ public class PonyElytra extends ModelBase {
leftWing.rotationPointY = rpY; leftWing.rotationPointY = rpY;
if (entity instanceof AbstractClientPlayer) { if (entity instanceof AbstractClientPlayer) {
AbstractClientPlayer player = (AbstractClientPlayer) entity; AbstractClientPlayer player = (AbstractClientPlayer)entity;
player.rotateElytraX += (rotateX - player.rotateElytraX) / 10; player.rotateElytraX += (rotateX - player.rotateElytraX) / 10;
player.rotateElytraY += (rotateY - player.rotateElytraY) / 10; player.rotateElytraY += (rotateY - player.rotateElytraY) / 10;

View file

@ -40,22 +40,22 @@ public class PonySnout {
public void init(float yOffset, float stretch) { public void init(float yOffset, float stretch) {
mare.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) mare.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.tex(10, 14) .addBackPlane(-2, 2, -5, 4, 2, stretch) .tex(10, 14).addBackPlane(-2, 2, -5, 4, 2, stretch)
.tex(11, 13) .addBackPlane(-1, 1, -5, 2, 1, stretch) .tex(11, 13).addBackPlane(-1, 1, -5, 2, 1, stretch)
.tex(9, 14) .addTopPlane(-2, 2, -5, 1, 1, stretch) .tex(9, 14).addTopPlane(-2, 2, -5, 1, 1, stretch)
.tex(14, 14) .addTopPlane( 1, 2, -5, 1, 1, stretch) .tex(14, 14).addTopPlane(1, 2, -5, 1, 1, stretch)
.tex(11, 12) .addTopPlane(-1, 1, -5, 2, 1, stretch) .tex(11, 12).addTopPlane(-1, 1, -5, 2, 1, stretch)
.tex(18, 7).addBottomPlane(-2, 4, -5, 4, 1, stretch) .tex(18, 7).addBottomPlane(-2, 4, -5, 4, 1, stretch)
.tex(9, 14) .addWestPlane(-2, 2, -5, 2, 1, stretch) .tex(9, 14).addWestPlane(-2, 2, -5, 2, 1, stretch)
.tex(14, 14) .addEastPlane( 2, 2, -5, 2, 1, stretch) .tex(14, 14).addEastPlane(2, 2, -5, 2, 1, stretch)
.tex(11, 12) .addWestPlane(-1, 1, -5, 1, 1, stretch) .tex(11, 12).addWestPlane(-1, 1, -5, 1, 1, stretch)
.tex(12, 12) .addEastPlane( 1, 1, -5, 1, 1, stretch); .tex(12, 12).addEastPlane(1, 1, -5, 1, 1, stretch);
stallion.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) stallion.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.tex(10, 13) .addBackPlane(-2, 1, -5, 4, 3, stretch) .tex(10, 13).addBackPlane(-2, 1, -5, 4, 3, stretch)
.tex(10, 13) .addTopPlane(-2, 1, -5, 4, 1, stretch) .tex(10, 13).addTopPlane(-2, 1, -5, 4, 1, stretch)
.tex(18, 7).addBottomPlane(-2, 4, -5, 4, 1, stretch) .tex(18, 7).addBottomPlane(-2, 4, -5, 4, 1, stretch)
.tex(10, 13) .addWestPlane(-2, 1, -5, 3, 1, stretch) .tex(10, 13).addWestPlane(-2, 1, -5, 3, 1, stretch)
.tex(13, 13) .addEastPlane( 2, 1, -5, 3, 1, stretch); .tex(13, 13).addEastPlane(2, 1, -5, 3, 1, stretch);
} }
public void setGender(PonyGender gender) { public void setGender(PonyGender gender) {

View file

@ -92,7 +92,7 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
super(model); super(model);
this.index = index; this.index = index;
offsetY = (float)index/4 + 0.063f; offsetY = (float)index / 4 + 0.063f;
init(yOffset, stretch); init(yOffset, stretch);
} }
@ -106,11 +106,11 @@ public class PonyTail extends PlaneRenderer implements IModelPart {
tex(32, 0).addTopPlane(-2, 0, 2, 4, 4, stretch); tex(32, 0).addTopPlane(-2, 0, 2, 4, 4, stretch);
} }
tex(36, texX).addEastPlane( 2, 0, 2, 4, 4, stretch) tex(36, texX).addEastPlane(2, 0, 2, 4, 4, stretch)
.addWestPlane(-2, 0, 2, 4, 4, stretch); .addWestPlane(-2, 0, 2, 4, 4, stretch);
tex(32, texX).addBackPlane(-2, 0, 2, 4, 4, stretch) tex(32, texX).addBackPlane(-2, 0, 2, 4, 4, stretch)
.addFrontPlane(-2, 0, 6, 4, 4, stretch); .addFrontPlane(-2, 0, 6, 4, 4, stretch);
tex(32, 0) .addBottomPlane(-2, 4, 2, 4, 4, stretch); tex(32, 0).addBottomPlane(-2, 4, 2, 4, 4, stretch);
} }
@Override @Override

View file

@ -39,15 +39,14 @@ public class SaddleBags implements IModelPart {
strap.offset(-x, y + 0.2F, z + 3).around(0, 4, 4) strap.offset(-x, y + 0.2F, z + 3).around(0, 4, 4)
.tex(56, 31).addTopPlane(0, 0, 0, 8, 1, stretch) .tex(56, 31).addTopPlane(0, 0, 0, 8, 1, stretch)
.addTopPlane( 0, 0, 1, 8, 1, stretch) .addTopPlane(0, 0, 1, 8, 1, stretch)
.addBackPlane( 0, 0, 2, 8, 1, stretch) .addBackPlane(0, 0, 2, 8, 1, stretch)
.addFrontPlane(0, 0, 0, 8, 1, stretch) .addFrontPlane(0, 0, 0, 8, 1, stretch)
.child(0).offset(0, -3, -0.305F).tex(56, 31) .child(0).offset(0, -3, -0.305F).tex(56, 31)
.addWestPlane( 4.0002F, 0, 0, 1, 3, stretch) // 0.0001 is there .addWestPlane(4.0002F, 0, 0, 1, 3, stretch) // 0.0001 is there
.addWestPlane( 4.0002F, -1, 0, 1, 3, stretch) // otherwise straps .addWestPlane(4.0002F, -1, 0, 1, 3, stretch) // otherwise straps
.addWestPlane(-4.0002F, 0, 0, 1, 3, stretch) // clip into the body .addWestPlane(-4.0002F, 0, 0, 1, 3, stretch) // clip into the body
.addWestPlane(-4.0002F, -1, 0, 1, 3, stretch) .addWestPlane(-4.0002F, -1, 0, 1, 3, stretch).rotateAngleX = ROTATE_270;
.rotateAngleX = ROTATE_270;
leftBag.offset(x, y, z).around(0, 4, 4) leftBag.offset(x, y, z).around(0, 4, 4)
.tex(56, 25).addBackPlane(0, 0, 0, 3, 6, stretch) .tex(56, 25).addBackPlane(0, 0, 0, 3, 6, stretch)
@ -55,10 +54,9 @@ public class SaddleBags implements IModelPart {
.tex(56, 19).addWestPlane(3, 0, 0, 6, 8, stretch) .tex(56, 19).addWestPlane(3, 0, 0, 6, 8, stretch)
.addWestPlane(0, 0, 0, 6, 8, stretch) .addWestPlane(0, 0, 0, 6, 8, stretch)
.child(0).offset(z, y, -x).tex(56, 16) .child(0).offset(z, y, -x).tex(56, 16)
.addTopPlane(0, 0, -3, 8, 3, stretch) .addTopPlane(0, 0, -3, 8, 3, stretch)
.tex(56, 22).flipZ() .tex(56, 22).flipZ()
.addBottomPlane(0, 6, -3, 8, 3, stretch) .addBottomPlane(0, 6, -3, 8, 3, stretch).rotateAngleY = ROTATE_270;
.rotateAngleY = ROTATE_270;
x += 3; x += 3;
@ -68,16 +66,15 @@ public class SaddleBags implements IModelPart {
.tex(56, 19).addWestPlane(3, 0, 0, 6, 8, stretch) .tex(56, 19).addWestPlane(3, 0, 0, 6, 8, stretch)
.addWestPlane(0, 0, 0, 6, 8, stretch) .addWestPlane(0, 0, 0, 6, 8, stretch)
.child(0).offset(z, y, x).tex(56, 16) .child(0).offset(z, y, x).tex(56, 16)
.flipZ().addTopPlane( 0, 0, -3, 8, 3, stretch) .flipZ().addTopPlane(0, 0, -3, 8, 3, stretch)
.tex(56, 22).flipZ().addBottomPlane(0, 6, -3, 8, 3, stretch) .tex(56, 22).flipZ().addBottomPlane(0, 6, -3, 8, 3, stretch).rotateAngleY = ROTATE_270;
.rotateAngleY = ROTATE_270;
} }
@Override @Override
public void setRotationAndAngles(boolean rainboom, float move, float swing, float bodySwing, float ticks) { public void setRotationAndAngles(boolean rainboom, float move, float swing, float bodySwing, float ticks) {
float pi = PI * (float) Math.pow(swing, 16); float pi = PI * (float)Math.pow(swing, 16);
float mve = move * 0.6662f; float mve = move * 0.6662f;
float srt = swing / 10; float srt = swing / 10;

View file

@ -31,14 +31,14 @@ public class SeaponyTail implements IModelPart {
@Override @Override
public void init(float yOffset, float stretch) { public void init(float yOffset, float stretch) {
tailBase.rotate(TAIL_ROTX, 0, 0).around(-2, 14, 8) tailBase.rotate(TAIL_ROTX, 0, 0).around(-2, 14, 8)
.box( 0, 0, 0, 4, 6, 4, stretch).flip(); .box(0, 0, 0, 4, 6, 4, stretch).flip();
tailTip.rotate(0, 0, 0).around(1, 5, 1) tailTip.rotate(0, 0, 0).around(1, 5, 1)
.box(0, 0, 0, 2, 6, 1, stretch); .box(0, 0, 0, 2, 6, 1, stretch);
tailFins.offset(1, 0, 4).rotate(-TAIL_ROTX, 0, 0) tailFins.offset(1, 0, 4).rotate(-TAIL_ROTX, 0, 0)
.addTopPlane(-8, 0, 0, 8, 8, stretch) .addTopPlane(-8, 0, 0, 8, 8, stretch)
.flip().addTopPlane( 0, 0, 0, 8, 8, stretch); .flip().addTopPlane(0, 0, 0, 8, 8, stretch);
} }
@Override @Override

View file

@ -25,8 +25,7 @@ public class UnicornHorn {
horn.offset(HORN_X + x, HORN_Y + y, HORN_Z + z) horn.offset(HORN_X + x, HORN_Y + y, HORN_Z + z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)
.box(0, 0, 0, 1, 4, 1, stretch) .box(0, 0, 0, 1, 4, 1, stretch).rotateAngleX = 0.5F;
.rotateAngleX = 0.5F;
glow.offset(HORN_X + x, HORN_Y + y, HORN_Z + z) glow.offset(HORN_X + x, HORN_Y + y, HORN_Z + z)
.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z) .around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z)

View file

@ -12,7 +12,8 @@ import com.minelittlepony.model.capabilities.IModelUnicorn;
import static com.minelittlepony.model.PonyModelConstants.*; import static com.minelittlepony.model.PonyModelConstants.*;
/** /**
* Used for both unicorns and alicorns since there's no logical way to keep them distinct and not duplicate stuff. * Used for both unicorns and alicorns since there's no logical way to keep them distinct and not
* duplicate stuff.
*/ */
public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn { public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn {
@ -155,7 +156,7 @@ public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn {
unicornArmLeft = new PonyRenderer(this, 40, 32).size(64, 64); unicornArmLeft = new PonyRenderer(this, 40, 32).size(64, 64);
unicornArmRight = new PonyRenderer(this, 40, 32).size(64, 64); unicornArmRight = new PonyRenderer(this, 40, 32).size(64, 64);
unicornArmLeft .box(FIRSTP_ARM_CENTRE_X, THIRDP_ARM_CENTRE_Y, THIRDP_ARM_CENTRE_Z, 4, 12, 4, stretch + .25F).around(5, yOffset + 2, 0); unicornArmLeft.box(FIRSTP_ARM_CENTRE_X, THIRDP_ARM_CENTRE_Y, THIRDP_ARM_CENTRE_Z, 4, 12, 4, stretch + .25F).around(5, yOffset + 2, 0);
unicornArmRight.box(FIRSTP_ARM_CENTRE_X, THIRDP_ARM_CENTRE_Y, THIRDP_ARM_CENTRE_Z, 4, 12, 4, stretch + .25F).around(-5, yOffset + 2, 0); unicornArmRight.box(FIRSTP_ARM_CENTRE_X, THIRDP_ARM_CENTRE_Y, THIRDP_ARM_CENTRE_Z, 4, 12, 4, stretch + .25F).around(-5, yOffset + 2, 0);
} }
} }

View file

@ -38,8 +38,8 @@ public class ModelZebra extends ModelEarthPony {
.box(0, -8, 6, 2, 6, 2, stretch) .box(0, -8, 6, 2, 6, 2, stretch)
.rotate(0.3F, 0, 0) .rotate(0.3F, 0, 0)
.child(0).offset(-1.01F, 2, -7) //0.01 to prevent z-fighting .child(0).offset(-1.01F, 2, -7) //0.01 to prevent z-fighting
.box(0, -10, 4, 2, 8, 2, stretch) .box(0, -10, 4, 2, 8, 2, stretch)
.box(0, -8, 6, 2, 6, 2, stretch) .box(0, -8, 6, 2, 6, 2, stretch)
.rotate(-1, 0, 0); .rotate(-1, 0, 0);
} }
} }

View file

@ -27,21 +27,21 @@ public class ModelBreezie extends ModelBiped {
bipedHead = new PonyRenderer(this) bipedHead = new PonyRenderer(this)
.child(new PonyRenderer(this) .child(new PonyRenderer(this)
.addBox(-3, -6, -3, 6, 6, 6).around(0, 0, -4) .addBox(-3, -6, -3, 6, 6, 6).around(0, 0, -4)
.tex(28, 0).addBox( 2, -7, 1, 1, 1, 1) .tex(28, 0).addBox(2, -7, 1, 1, 1, 1)
.tex(24, 0).addBox(-3, -7, 1, 1, 1, 1) .tex(24, 0).addBox(-3, -7, 1, 1, 1, 1)
.tex(24, 9).addBox(-1, -2, -4, 2, 2, 1)) .tex(24, 9).addBox(-1, -2, -4, 2, 2, 1))
.child(new PonyRenderer(this) .child(new PonyRenderer(this)
.tex(28, 2).addBox( 1, -11, -2, 1, 6, 1) .tex(28, 2).addBox(1, -11, -2, 1, 6, 1)
.tex(24, 2).addBox(-2, -11, -2, 1, 6, 1) .tex(24, 2).addBox(-2, -11, -2, 1, 6, 1)
.rotate(-0.2617994F, 0, 0)); .rotate(-0.2617994F, 0, 0));
bipedBody = new PonyRenderer(this, 2, 12) bipedBody = new PonyRenderer(this, 2, 12)
.addBox(0, 0, 0, 6, 7, 14).rotate(-0.5235988F, 0, 0).around(-3, 1, -3); .addBox(0, 0, 0, 6, 7, 14).rotate(-0.5235988F, 0, 0).around(-3, 1, -3);
bipedLeftArm = new PonyRenderer(this, 28, 12).addBox(0, 0, 0, 2, 12, 2).around( 1, 8, -5); bipedLeftArm = new PonyRenderer(this, 28, 12).addBox(0, 0, 0, 2, 12, 2).around(1, 8, -5);
bipedRightArm = new PonyRenderer(this, 36, 12).addBox(0, 0, 0, 2, 12, 2).around(-3, 8, -5); bipedRightArm = new PonyRenderer(this, 36, 12).addBox(0, 0, 0, 2, 12, 2).around(-3, 8, -5);
bipedLeftLeg = new PonyRenderer(this, 8, 12) .addBox(0, 0, 0, 2, 12, 2).around( 1, 12, 3); bipedLeftLeg = new PonyRenderer(this, 8, 12).addBox(0, 0, 0, 2, 12, 2).around(1, 12, 3);
bipedRightLeg = new PonyRenderer(this, 0, 12) .addBox(0, 0, 0, 2, 12, 2).around(-3, 12, 3); bipedRightLeg = new PonyRenderer(this, 0, 12).addBox(0, 0, 0, 2, 12, 2).around(-3, 12, 3);
neck = new PonyRenderer(this, 40, 0) neck = new PonyRenderer(this, 40, 0)
.addBox(0, 0, 0, 2, 5, 2) .addBox(0, 0, 0, 2, 5, 2)
@ -85,9 +85,9 @@ public class ModelBreezie extends ModelBiped {
bipedLeftArm.rotateAngleX = MathHelper.cos(move * 0.6662F) * swing; bipedLeftArm.rotateAngleX = MathHelper.cos(move * 0.6662F) * swing;
bipedLeftArm.rotateAngleZ = 0; bipedLeftArm.rotateAngleZ = 0;
((PonyRenderer)bipedRightArm).rotate(swing * MathHelper.cos(move * 0.6662F + PI), 0, 0); ((PonyRenderer)bipedRightArm).rotate(swing * MathHelper.cos(move * 0.6662F + PI), 0, 0);
((PonyRenderer)bipedLeftLeg) .rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0); ((PonyRenderer)bipedLeftLeg).rotate(swing * MathHelper.cos(move * 0.6662F + PI) * 1.4F, 0, 0);
((PonyRenderer)bipedRightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0); ((PonyRenderer)bipedRightLeg).rotate(swing * MathHelper.cos(move * 0.6662F) * 1.4F, 0, 0);
if (isRiding) { if (isRiding) {
bipedLeftArm.rotateAngleX += -PI / 5; bipedLeftArm.rotateAngleX += -PI / 5;

View file

@ -19,7 +19,7 @@ public class ModelIllagerPony extends ModelAlicorn {
public void setRotationAngles(float move, float swing, float ticks, float headYaw, float headPitch, float scale, Entity entity) { public void setRotationAngles(float move, float swing, float ticks, float headYaw, float headPitch, float scale, Entity entity) {
super.setRotationAngles(move, swing, ticks, headYaw, headPitch, scale, entity); super.setRotationAngles(move, swing, ticks, headYaw, headPitch, scale, entity);
AbstractIllager illager = (AbstractIllager) entity; AbstractIllager illager = (AbstractIllager)entity;
IllagerArmPose pose = illager.getArmPose(); IllagerArmPose pose = illager.getArmPose();
boolean rightHanded = illager.getPrimaryHand() == EnumHandSide.RIGHT; boolean rightHanded = illager.getPrimaryHand() == EnumHandSide.RIGHT;
@ -28,15 +28,15 @@ public class ModelIllagerPony extends ModelAlicorn {
if (pose == IllagerArmPose.ATTACKING) { if (pose == IllagerArmPose.ATTACKING) {
// vindicator attacking // vindicator attacking
float f = MathHelper.sin(swingProgress * (float) Math.PI); float f = MathHelper.sin(swingProgress * (float)Math.PI);
float f1 = MathHelper.sin((1.0F - (1.0F - swingProgress) * (1.0F - swingProgress)) * (float) Math.PI); float f1 = MathHelper.sin((1.0F - (1.0F - swingProgress) * (1.0F - swingProgress)) * (float)Math.PI);
float cos = MathHelper.cos(ticks * 0.09F) * 0.05F + 0.05F; float cos = MathHelper.cos(ticks * 0.09F) * 0.05F + 0.05F;
float sin = MathHelper.sin(ticks * 0.067F) * 0.05F; float sin = MathHelper.sin(ticks * 0.067F) * 0.05F;
bipedRightArm.rotateAngleZ = cos; bipedRightArm.rotateAngleZ = cos;
bipedLeftArm.rotateAngleZ = cos; bipedLeftArm.rotateAngleZ = cos;
bipedRightArm.rotateAngleY = 0.15707964F; bipedRightArm.rotateAngleY = 0.15707964F;
bipedLeftArm.rotateAngleY = -0.15707964F; bipedLeftArm.rotateAngleY = -0.15707964F;
@ -45,10 +45,10 @@ public class ModelIllagerPony extends ModelAlicorn {
arm.rotateAngleX += f * 2.2F - f1 * 0.4F; arm.rotateAngleX += f * 2.2F - f1 * 0.4F;
bipedRightArm.rotateAngleX += sin; bipedRightArm.rotateAngleX += sin;
bipedLeftArm.rotateAngleX -= sin; bipedLeftArm.rotateAngleX -= sin;
} else if (pose == IllagerArmPose.SPELLCASTING) { } else if (pose == IllagerArmPose.SPELLCASTING) {
// waving arms! // waving arms!
arm.rotateAngleX = (float) (-0.75F * Math.PI); arm.rotateAngleX = (float)(-0.75F * Math.PI);
arm.rotateAngleZ = mult * MathHelper.cos(ticks * 0.6662F) / 4; arm.rotateAngleZ = mult * MathHelper.cos(ticks * 0.6662F) / 4;
arm.rotateAngleY = mult * 1.1F; arm.rotateAngleY = mult * 1.1F;
} else if (pose == IllagerArmPose.BOW_AND_ARROW) { } else if (pose == IllagerArmPose.BOW_AND_ARROW) {

View file

@ -28,7 +28,7 @@ public class ModelWitchPony extends ModelZebra {
@Override @Override
public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) { public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) {
EntityWitch witch = (EntityWitch) entity; EntityWitch witch = (EntityWitch)entity;
leftArmPose = ArmPose.EMPTY; leftArmPose = ArmPose.EMPTY;
rightArmPose = witch.getHeldItemMainhand().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM; rightArmPose = witch.getHeldItemMainhand().isEmpty() ? ArmPose.EMPTY : ArmPose.ITEM;
@ -56,7 +56,7 @@ public class ModelWitchPony extends ModelZebra {
rot = -1; rot = -1;
} }
float legDrinkingAngle = -1 * PI/3 + rot; float legDrinkingAngle = -1 * PI / 3 + rot;
bipedRightArm.rotateAngleX = legDrinkingAngle; bipedRightArm.rotateAngleX = legDrinkingAngle;
bipedRightArmwear.rotateAngleX = legDrinkingAngle; bipedRightArmwear.rotateAngleX = legDrinkingAngle;
@ -97,13 +97,13 @@ public class ModelWitchPony extends ModelZebra {
witchHat.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z - 2) witchHat.around(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z - 2)
.tex(0, 64).box(-5, -6, -7, 10, 2, 10, stretch) .tex(0, 64).box(-5, -6, -7, 10, 2, 10, stretch)
.child(0).around(1.75F, -4, 2) .child(0).around(1.75F, -4, 2)
.tex(0, 76).box(-5, -5, -7, 7, 4, 7, stretch) .tex(0, 76).box(-5, -5, -7, 7, 4, 7, stretch)
.rotate(-0.05235988F, 0, 0.02617994F) .rotate(-0.05235988F, 0, 0.02617994F)
.child(0).around(1.75F, -4, 2) .child(0).around(1.75F, -4, 2)
.tex(0, 87).box(-5, -4, -7, 4, 4, 4, stretch) .tex(0, 87).box(-5, -4, -7, 4, 4, 4, stretch)
.rotate(-0.10471976F, 0, 0.05235988F) .rotate(-0.10471976F, 0, 0.05235988F)
.child(0).around(1.75F, -2, 2) .child(0).around(1.75F, -2, 2)
.tex(0, 95).box(-5, -2, -7, 1, 2, 1, stretch) .tex(0, 95).box(-5, -2, -7, 1, 2, 1, stretch)
.rotate(-0.20943952F, 0, 0.10471976F); .rotate(-0.20943952F, 0, 0.10471976F);
} }
} }

View file

@ -5,7 +5,7 @@ import com.minelittlepony.model.player.PlayerModels;
public enum PonyRace implements ITriggerPixelMapped<PonyRace> { public enum PonyRace implements ITriggerPixelMapped<PonyRace> {
HUMAN(0, PlayerModels.DEFAULT, false, false), HUMAN(0, PlayerModels.DEFAULT, false, false),
EARTH(0xf9b131, PlayerModels.EARTH,false, false), EARTH(0xf9b131, PlayerModels.EARTH, false, false),
PEGASUS(0x88caf0, PlayerModels.PEGASUS, true, false), PEGASUS(0x88caf0, PlayerModels.PEGASUS, true, false),
UNICORN(0xd19fe4, PlayerModels.UNICORN, false, true), UNICORN(0xd19fe4, PlayerModels.UNICORN, false, true),
ALICORN(0xfef9fc, PlayerModels.ALICORN, true, true), ALICORN(0xfef9fc, PlayerModels.ALICORN, true, true),
@ -33,6 +33,7 @@ public enum PonyRace implements ITriggerPixelMapped<PonyRace> {
/** /**
* Returns true if this pony has a horn (and by extension can cast magic). * Returns true if this pony has a horn (and by extension can cast magic).
*
* @return * @return
*/ */
public boolean hasHorn() { public boolean hasHorn() {
@ -61,10 +62,9 @@ public enum PonyRace implements ITriggerPixelMapped<PonyRace> {
} }
/** /**
* Gets the actual race determined by the given pony level. * Gets the actual race determined by the given pony level. PonyLevel.HUMANS would force all races
* PonyLevel.HUMANS would force all races to be humans. * to be humans. PonyLevel.BOTH is no change. PonyLevel.PONIES (should) return a pony if this is a
* PonyLevel.BOTH is no change. * human. Don't be fooled, though. It doesn't.
* PonyLevel.PONIES (should) return a pony if this is a human. Don't be fooled, though. It doesn't.
*/ */
public PonyRace getEffectiveRace(PonyLevel level) { public PonyRace getEffectiveRace(PonyLevel level) {
if (level == PonyLevel.HUMANS) { if (level == PonyLevel.HUMANS) {

View file

@ -42,20 +42,20 @@ public class HornGlow extends Box<HornGlowRenderer> {
// w:west e:east d:down u:up s:south n:north // w:west e:east d:down u:up s:south n:north
Vertex wds = vert(tipXmin, yMin, tipZmin, 0, 0); Vertex wds = vert(tipXmin, yMin, tipZmin, 0, 0);
Vertex eds = vert(tipXMax, yMin, tipZmin, 0, 8); Vertex eds = vert(tipXMax, yMin, tipZmin, 0, 8);
Vertex eus = vert(xMax, yMax, zMin, 8, 8); Vertex eus = vert(xMax, yMax, zMin, 8, 8);
Vertex wus = vert(xMin, yMax, zMin, 8, 0); Vertex wus = vert(xMin, yMax, zMin, 8, 0);
Vertex wdn = vert(tipXmin, yMin, tipZMax, 0, 0); Vertex wdn = vert(tipXmin, yMin, tipZMax, 0, 0);
Vertex edn = vert(tipXMax, yMin, tipZMax, 0, 8); Vertex edn = vert(tipXMax, yMin, tipZMax, 0, 8);
Vertex eun = vert(xMax, yMax, zMax, 8, 8); Vertex eun = vert(xMax, yMax, zMax, 8, 8);
Vertex wun = vert(xMin, yMax, zMax, 8, 0); Vertex wun = vert(xMin, yMax, zMax, 8, 0);
quadList = new Quad[] { quadList = new Quad[] {
quad(texX + d + w, d, texY + d, h, edn, eds, eus, eun), quad(texX + d + w, d, texY + d, h, edn, eds, eus, eun),
quad(texX, d, texY + d, h, wds, wdn, wun, wus), quad(texX, d, texY + d, h, wds, wdn, wun, wus),
quad(texX + d, w, texY, d, edn, wdn, wds, eds), quad(texX + d, w, texY, d, edn, wdn, wds, eds),
quad(texX + d + w, w, texY + d, -d, eus, wus, wun, eun), quad(texX + d + w, w, texY + d, -d, eus, wus, wun, eun),
quad(texX + d, w, texY + d, h, eds, wds, wus, eus), quad(texX + d, w, texY + d, h, eds, wds, wus, eus),
quad(texX + d + w + d, w, texY + d, h, wdn, edn, eun, wun) quad(texX + d + w + d, w, texY + d, h, wdn, edn, eun, wun)
}; };
if (renderer.mirror) { if (renderer.mirror) {