mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-29 23:48:00 +01:00
The problem childs
This commit is contained in:
parent
65a5fc230c
commit
bee8d0556d
19 changed files with 182 additions and 168 deletions
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
* 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 entity The entity we're being called for.
|
* @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,9 +307,11 @@ 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
|
||||||
|
* 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 entity The entity we're being called for.
|
* @param entity The entity we're being called for.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -325,14 +335,16 @@ 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
|
||||||
|
* 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 entity The entity we're being called for.
|
* @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;
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -542,7 +555,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel {
|
||||||
.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)
|
||||||
|
@ -577,20 +590,20 @@ 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);
|
||||||
|
@ -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;
|
||||||
|
|
|
@ -64,7 +64,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,19 +31,17 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
@ -57,8 +56,7 @@ public class SaddleBags implements IModelPart {
|
||||||
.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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
@ -86,7 +86,7 @@ public class ModelBreezie extends ModelBiped {
|
||||||
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) {
|
||||||
|
|
|
@ -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,8 +28,8 @@ 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;
|
||||||
|
@ -48,7 +48,7 @@ public class ModelIllagerPony extends ModelAlicorn {
|
||||||
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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue