mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Add some more randomness to mobs, finish villagers.
Fix skeleton rendering
This commit is contained in:
parent
5a2c7cce85
commit
8dea16d563
8 changed files with 169 additions and 105 deletions
|
@ -0,0 +1,127 @@
|
|||
package com.brohoof.minelittlepony.model;
|
||||
|
||||
import com.brohoof.minelittlepony.model.pony.pm_newPonyAdv;
|
||||
import com.brohoof.minelittlepony.renderer.AniParams;
|
||||
import com.brohoof.minelittlepony.renderer.PlaneRenderer;
|
||||
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelVillagerPony extends pm_newPonyAdv {
|
||||
|
||||
public PlaneRenderer[] VillagerBagPiece;
|
||||
public PlaneRenderer VillagerApron;
|
||||
public PlaneRenderer VillagerTrinket;
|
||||
|
||||
public int profession;
|
||||
|
||||
@Override
|
||||
public void animate(AniParams aniparams) {
|
||||
super.animate(aniparams);
|
||||
float bodySwingRotation = 0.0F;
|
||||
if (this.swingProgress > -9990.0F && (!this.metadata.getRace().hasHorn() || this.metadata.getGlowColor() == 0)) {
|
||||
bodySwingRotation = MathHelper.sin(MathHelper.sqrt_float(this.swingProgress) * 3.1415927F * 2.0F) * 0.2F;
|
||||
}
|
||||
for (int i = 0; i < this.VillagerBagPiece.length; ++i) {
|
||||
this.VillagerBagPiece[i].rotateAngleY = bodySwingRotation * 0.2F;
|
||||
}
|
||||
|
||||
this.VillagerBagPiece[4].rotateAngleY += 4.712389F;
|
||||
this.VillagerBagPiece[5].rotateAngleY += 4.712389F;
|
||||
this.VillagerBagPiece[6].rotateAngleY += 4.712389F;
|
||||
this.VillagerBagPiece[7].rotateAngleY += 4.712389F;
|
||||
this.VillagerApron.rotateAngleY = bodySwingRotation * 0.2F;
|
||||
this.VillagerTrinket.rotateAngleY = bodySwingRotation * 0.2F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void adjustBodyComponents(float rotateAngleX, float rotationPointY, float rotationPointZ) {
|
||||
super.adjustBodyComponents(rotateAngleX, rotationPointY, rotationPointZ);
|
||||
|
||||
for (int i = 0; i < this.VillagerBagPiece.length; ++i) {
|
||||
this.VillagerBagPiece[i].rotateAngleX = rotateAngleX;
|
||||
this.VillagerBagPiece[i].rotationPointY = rotationPointY;
|
||||
this.VillagerBagPiece[i].rotationPointZ = rotationPointZ;
|
||||
}
|
||||
|
||||
this.VillagerApron.rotateAngleX = rotateAngleX;
|
||||
this.VillagerApron.rotationPointY = rotationPointY;
|
||||
this.VillagerApron.rotationPointZ = rotationPointZ;
|
||||
this.VillagerTrinket.rotateAngleX = rotateAngleX;
|
||||
this.VillagerTrinket.rotationPointY = rotationPointY;
|
||||
this.VillagerTrinket.rotationPointZ = rotationPointZ;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderBody() {
|
||||
super.renderBody();
|
||||
|
||||
if (profession < 2) {
|
||||
for (int i = 0; i < this.VillagerBagPiece.length; ++i) {
|
||||
this.VillagerBagPiece[i].render(this.scale);
|
||||
}
|
||||
} else if (profession == 2) {
|
||||
this.VillagerTrinket.render(this.scale);
|
||||
} else if (profession > 2) {
|
||||
this.VillagerApron.render(this.scale);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initTextures() {
|
||||
super.initTextures();
|
||||
this.VillagerBagPiece = new PlaneRenderer[14];
|
||||
this.VillagerBagPiece[0] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[1] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[2] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[3] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[4] = new PlaneRenderer(this, 56, 16);
|
||||
this.VillagerBagPiece[5] = new PlaneRenderer(this, 56, 16);
|
||||
this.VillagerBagPiece[6] = new PlaneRenderer(this, 56, 22);
|
||||
this.VillagerBagPiece[7] = new PlaneRenderer(this, 56, 22);
|
||||
this.VillagerBagPiece[8] = new PlaneRenderer(this, 56, 25);
|
||||
this.VillagerBagPiece[9] = new PlaneRenderer(this, 56, 25);
|
||||
this.VillagerBagPiece[10] = new PlaneRenderer(this, 59, 25);
|
||||
this.VillagerBagPiece[11] = new PlaneRenderer(this, 59, 25);
|
||||
this.VillagerBagPiece[12] = new PlaneRenderer(this, 56, 31);
|
||||
this.VillagerBagPiece[13] = new PlaneRenderer(this, 56, 31);
|
||||
this.VillagerApron = new PlaneRenderer(this, 56, 16);
|
||||
this.VillagerTrinket = new PlaneRenderer(this, 0, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initPositions(float yOffset, float stretch) {
|
||||
super.initPositions(yOffset, stretch);
|
||||
this.VillagerBagPiece[0].addSidePlane(-7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[0].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[1].addSidePlane(-4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[1].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[2].addSidePlane(4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[2].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[3].addSidePlane(7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[3].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[4].addTopPlane(2.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -2.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[4].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[5].addTopPlane(2.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -13.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[5].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[6].addBottomPlane(2.0F + BODY_CENTRE_X, 1.0F + BODY_CENTRE_Y, -2.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[6].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[7].addBottomPlane(2.0F + BODY_CENTRE_X, 1.0F + BODY_CENTRE_Y, -13.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[7].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[8].addBackPlane(-7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[8].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[9].addBackPlane(4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[9].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[10].addBackPlane(-7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, 4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[10].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[11].addBackPlane(4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, 4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[11].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[12].addTopPlane(-4.0F + BODY_CENTRE_X, -4.5F + BODY_CENTRE_Y, -1.0F + BODY_CENTRE_Z, 8, 0, 1, stretch);
|
||||
this.VillagerBagPiece[13].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[13].addTopPlane(-4.0F + BODY_CENTRE_X, -4.5F + BODY_CENTRE_Y, 0.0F + BODY_CENTRE_Z, 8, 0, 1, stretch);
|
||||
this.VillagerBagPiece[13].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerApron.addBackPlane(-4.0F + BODY_CENTRE_X, -4.0F + BODY_CENTRE_Y, -9.0F + BODY_CENTRE_Z, 8, 10, 0, stretch);
|
||||
this.VillagerApron.setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerTrinket.addBackPlane(-2.0F + BODY_CENTRE_X, -4.0F + BODY_CENTRE_Y, -9.0F + BODY_CENTRE_Z, 4, 5, 0, stretch);
|
||||
this.VillagerTrinket.setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@ public final class PMAPI {
|
|||
public static final PlayerModel pony = new PlayerModel(new pm_newPonyAdv()).setArmor(new pma_newPony());
|
||||
public static final PlayerModel zombie = new PlayerModel(new pm_zombiePony()).setArmor(new pma_zombiePony());
|
||||
public static final PlayerModel skeleton = new PlayerModel(new pm_skeletonPony()).setArmor(new pma_skeletonPony());
|
||||
public static final PlayerModel villager = new PlayerModel(new ModelVillagerPony()).setArmor(new pma_newPony());
|
||||
public static final PlayerModel human = new PlayerModel(new pm_Human()).setArmor(new pma_Human());
|
||||
|
||||
public static void init() {
|
||||
|
|
|
@ -29,9 +29,6 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
|
|||
public ModelRenderer bipedCape;
|
||||
|
||||
public PlaneRenderer[] Bodypiece;
|
||||
public PlaneRenderer[] VillagerBagPiece;
|
||||
public PlaneRenderer VillagerApron;
|
||||
public PlaneRenderer VillagerTrinket;
|
||||
public PlaneRenderer[] BodypieceNeck;
|
||||
public ModelRenderer SteveArm;
|
||||
public ModelRenderer unicornarm;
|
||||
|
@ -65,16 +62,6 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
|
|||
this.Bodypiece[k1].rotateAngleY = bodySwingRotation * 0.2F;
|
||||
}
|
||||
|
||||
for (k1 = 0; k1 < this.VillagerBagPiece.length; ++k1) {
|
||||
this.VillagerBagPiece[k1].rotateAngleY = bodySwingRotation * 0.2F;
|
||||
}
|
||||
|
||||
this.VillagerBagPiece[4].rotateAngleY += 4.712389F;
|
||||
this.VillagerBagPiece[5].rotateAngleY += 4.712389F;
|
||||
this.VillagerBagPiece[6].rotateAngleY += 4.712389F;
|
||||
this.VillagerBagPiece[7].rotateAngleY += 4.712389F;
|
||||
this.VillagerApron.rotateAngleY = bodySwingRotation * 0.2F;
|
||||
this.VillagerTrinket.rotateAngleY = bodySwingRotation * 0.2F;
|
||||
|
||||
for (k1 = 0; k1 < this.BodypieceNeck.length; ++k1) {
|
||||
this.BodypieceNeck[k1].rotateAngleY = bodySwingRotation * 0.2F;
|
||||
|
@ -377,19 +364,6 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
|
|||
this.Bodypiece[k3].rotationPointY = rotationPointY;
|
||||
this.Bodypiece[k3].rotationPointZ = rotationPointZ;
|
||||
}
|
||||
|
||||
for (k3 = 0; k3 < this.VillagerBagPiece.length; ++k3) {
|
||||
this.VillagerBagPiece[k3].rotateAngleX = rotateAngleX;
|
||||
this.VillagerBagPiece[k3].rotationPointY = rotationPointY;
|
||||
this.VillagerBagPiece[k3].rotationPointZ = rotationPointZ;
|
||||
}
|
||||
|
||||
this.VillagerApron.rotateAngleX = rotateAngleX;
|
||||
this.VillagerApron.rotationPointY = rotationPointY;
|
||||
this.VillagerApron.rotationPointZ = rotationPointZ;
|
||||
this.VillagerTrinket.rotateAngleX = rotateAngleX;
|
||||
this.VillagerTrinket.rotationPointY = rotationPointY;
|
||||
this.VillagerTrinket.rotationPointZ = rotationPointZ;
|
||||
}
|
||||
|
||||
protected void adjustNeck(float rotateAngleX, float rotationPointY, float rotationPointZ) {
|
||||
|
@ -658,21 +632,6 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
|
|||
this.Bodypiece[k1].render(this.scale);
|
||||
}
|
||||
|
||||
// TODO: villager data
|
||||
//@formatter:off
|
||||
// if (this.metadata.isVillager()) {
|
||||
// if (this.metadata.getVillagerProfession() < 2) {
|
||||
// for (k1 = 0; k1 < this.VillagerBagPiece.length; ++k1) {
|
||||
// this.VillagerBagPiece[k1].render(this.scale);
|
||||
// }
|
||||
// } else if (this.metadata.getVillagerProfession() == 2) {
|
||||
// this.VillagerTrinket.render(this.scale);
|
||||
// } else if (this.metadata.getVillagerProfession() > 2) {
|
||||
// this.VillagerApron.render(this.scale);
|
||||
// }
|
||||
// }
|
||||
//@formatter:on
|
||||
|
||||
}
|
||||
|
||||
protected void renderTail() {
|
||||
|
@ -704,7 +663,6 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
|
|||
this.Tail = new PlaneRenderer[21];
|
||||
|
||||
this.Bodypiece = new PlaneRenderer[14];
|
||||
this.VillagerBagPiece = new PlaneRenderer[14];
|
||||
this.BodypieceNeck = new PlaneRenderer[4];
|
||||
this.initHeadTextures();
|
||||
this.initBodyTextures();
|
||||
|
@ -749,22 +707,6 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
|
|||
this.BodypieceNeck[2] = new PlaneRenderer(this, 0, 16);
|
||||
this.BodypieceNeck[3] = new PlaneRenderer(this, 0, 16);
|
||||
|
||||
this.VillagerBagPiece[0] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[1] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[2] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[3] = new PlaneRenderer(this, 56, 19);
|
||||
this.VillagerBagPiece[4] = new PlaneRenderer(this, 56, 16);
|
||||
this.VillagerBagPiece[5] = new PlaneRenderer(this, 56, 16);
|
||||
this.VillagerBagPiece[6] = new PlaneRenderer(this, 56, 22);
|
||||
this.VillagerBagPiece[7] = new PlaneRenderer(this, 56, 22);
|
||||
this.VillagerBagPiece[8] = new PlaneRenderer(this, 56, 25);
|
||||
this.VillagerBagPiece[9] = new PlaneRenderer(this, 56, 25);
|
||||
this.VillagerBagPiece[10] = new PlaneRenderer(this, 59, 25);
|
||||
this.VillagerBagPiece[11] = new PlaneRenderer(this, 59, 25);
|
||||
this.VillagerBagPiece[12] = new PlaneRenderer(this, 56, 31);
|
||||
this.VillagerBagPiece[13] = new PlaneRenderer(this, 56, 31);
|
||||
this.VillagerApron = new PlaneRenderer(this, 56, 16);
|
||||
this.VillagerTrinket = new PlaneRenderer(this, 0, 3);
|
||||
}
|
||||
|
||||
protected void initLegTextures() {
|
||||
|
@ -866,38 +808,7 @@ public class pm_newPonyAdv extends ModelPony implements PonyModelConstants {
|
|||
this.Bodypiece[12].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.Bodypiece[13].addBackPlane(-1.0F + BODY_CENTRE_X, 2.0F + BODY_CENTRE_Y, 8.0F + BODY_CENTRE_Z, 2, 2, 0, stretch);
|
||||
this.Bodypiece[13].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[0].addSidePlane(-7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[0].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[1].addSidePlane(-4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[1].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[2].addSidePlane(4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[2].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[3].addSidePlane(7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 0, 6, 8, stretch);
|
||||
this.VillagerBagPiece[3].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[4].addTopPlane(2.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -2.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[4].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[5].addTopPlane(2.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -13.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[5].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[6].addBottomPlane(2.0F + BODY_CENTRE_X, 1.0F + BODY_CENTRE_Y, -2.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[6].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[7].addBottomPlane(2.0F + BODY_CENTRE_X, 1.0F + BODY_CENTRE_Y, -13.0F + BODY_CENTRE_Z, 8, 0, 3, stretch);
|
||||
this.VillagerBagPiece[7].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[8].addBackPlane(-7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[8].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[9].addBackPlane(4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, -4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[9].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[10].addBackPlane(-7.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, 4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[10].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[11].addBackPlane(4.0F + BODY_CENTRE_X, -5.0F + BODY_CENTRE_Y, 4.0F + BODY_CENTRE_Z, 3, 6, 0, stretch);
|
||||
this.VillagerBagPiece[11].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[12].addTopPlane(-4.0F + BODY_CENTRE_X, -4.5F + BODY_CENTRE_Y, -1.0F + BODY_CENTRE_Z, 8, 0, 1, stretch);
|
||||
this.VillagerBagPiece[13].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerBagPiece[13].addTopPlane(-4.0F + BODY_CENTRE_X, -4.5F + BODY_CENTRE_Y, 0.0F + BODY_CENTRE_Z, 8, 0, 1, stretch);
|
||||
this.VillagerBagPiece[13].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerApron.addBackPlane(-4.0F + BODY_CENTRE_X, -4.0F + BODY_CENTRE_Y, -9.0F + BODY_CENTRE_Z, 8, 10, 0, stretch);
|
||||
this.VillagerApron.setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.VillagerTrinket.addBackPlane(-2.0F + BODY_CENTRE_X, -4.0F + BODY_CENTRE_Y, -9.0F + BODY_CENTRE_Z, 4, 5, 0, stretch);
|
||||
this.VillagerTrinket.setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
|
||||
this.BodypieceNeck[0].addBackPlane(-2.0F + BODY_CENTRE_X, -6.8F + BODY_CENTRE_Y, -8.8F + BODY_CENTRE_Z, 4, 4, 0, stretch);
|
||||
this.BodypieceNeck[0].setRotationPoint(HEAD_RP_X, HEAD_RP_Y + yOffset, HEAD_RP_Z);
|
||||
this.BodypieceNeck[1].addBackPlane(-2.0F + BODY_CENTRE_X, -6.8F + BODY_CENTRE_Y, -4.8F + BODY_CENTRE_Z, 4, 4, 0, stretch);
|
||||
|
|
|
@ -8,10 +8,6 @@ import static net.minecraft.client.renderer.GlStateManager.translate;
|
|||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class pm_skeletonPony extends pm_newPonyAdv {
|
||||
|
||||
public pm_skeletonPony() {
|
||||
metadata.setGlowColor(0xff6666dd);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void rotateLegs(float move, float swing, float tick) {
|
||||
|
|
|
@ -2,8 +2,10 @@ package com.brohoof.minelittlepony.renderer;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.brohoof.minelittlepony.PonyGender;
|
||||
import com.brohoof.minelittlepony.PonyManager;
|
||||
import com.brohoof.minelittlepony.PonyRace;
|
||||
import com.brohoof.minelittlepony.PonySize;
|
||||
import com.brohoof.minelittlepony.TailLengths;
|
||||
import com.brohoof.minelittlepony.model.PMAPI;
|
||||
|
||||
|
@ -19,8 +21,8 @@ public class RenderPonySkeleton extends RenderPonyMob<EntitySkeleton> {
|
|||
addLayer(new LayerBipedArmor(this) {
|
||||
@Override
|
||||
protected void initArmor() {
|
||||
this.field_177189_c = PMAPI.skeleton.getModel();
|
||||
this.field_177186_d = PMAPI.skeleton.getModel();
|
||||
this.field_177189_c = PMAPI.skeleton.getArmor().modelArmor;
|
||||
this.field_177186_d = PMAPI.skeleton.getArmor().modelArmorChestplate;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -32,16 +34,23 @@ public class RenderPonySkeleton extends RenderPonyMob<EntitySkeleton> {
|
|||
}
|
||||
|
||||
Random rand = new Random(skeleton.getUniqueID().hashCode());
|
||||
switch (rand.nextInt() % 3) {
|
||||
this.playerModel.getModel().metadata.setGender(rand.nextBoolean() ? PonyGender.MARE : PonyGender.STALLION);
|
||||
switch (rand.nextInt(4)) {
|
||||
case 0:
|
||||
case 1:
|
||||
this.playerModel.getModel().metadata.setRace(PonyRace.UNICORN);
|
||||
this.playerModel.getModel().metadata.setGlowColor(rand.nextInt());
|
||||
break;
|
||||
case 2:
|
||||
this.playerModel.getModel().metadata.setRace(PonyRace.EARTH);
|
||||
break;
|
||||
case 3:
|
||||
this.playerModel.getModel().metadata.setRace(PonyRace.PEGASUS);
|
||||
}
|
||||
PonySize[] sizes = PonySize.values();
|
||||
PonySize size = sizes[rand.nextInt(sizes.length)];
|
||||
this.playerModel.getModel().metadata.setSize(size== PonySize.FOAL ? PonySize.NORMAL : size);
|
||||
this.playerModel.getModel().metadata.setTail(TailLengths.STUB);
|
||||
this.playerModel.getModel().metadata.setGlowColor(rand.nextInt());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.brohoof.minelittlepony.renderer;
|
||||
package com.brohoof.minelittlepony.renderer;
|
||||
|
||||
import com.brohoof.minelittlepony.MineLittlePony;
|
||||
import com.brohoof.minelittlepony.Pony;
|
||||
import com.brohoof.minelittlepony.model.PMAPI;
|
||||
import com.brohoof.minelittlepony.model.ModelVillagerPony;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
|
@ -12,7 +13,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
public class RenderPonyVillager extends RenderPonyMob<EntityVillager> {
|
||||
|
||||
public RenderPonyVillager(RenderManager rm) {
|
||||
super(rm, PMAPI.pony);
|
||||
super(rm, PMAPI.villager);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -26,6 +27,7 @@ public class RenderPonyVillager extends RenderPonyMob<EntityVillager> {
|
|||
this.shadowSize = 0.5F;
|
||||
}
|
||||
}
|
||||
((ModelVillagerPony)this.mainModel).profession = villager.getProfession();
|
||||
|
||||
GlStateManager.scale(0.9375F, 0.9375F, 0.9375F);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import java.util.Random;
|
|||
import com.brohoof.minelittlepony.PonyGender;
|
||||
import com.brohoof.minelittlepony.PonyManager;
|
||||
import com.brohoof.minelittlepony.PonyRace;
|
||||
import com.brohoof.minelittlepony.PonySize;
|
||||
import com.brohoof.minelittlepony.TailLengths;
|
||||
import com.brohoof.minelittlepony.model.PMAPI;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
|
@ -25,24 +27,40 @@ public class RenderPonyZombie extends RenderPonyMob<EntityZombie> {
|
|||
// 50-50 chance for gender
|
||||
this.playerModel.getModel().metadata.setGender(rand.nextBoolean() ? PonyGender.MARE : PonyGender.STALLION);
|
||||
|
||||
switch (rand.nextInt(5)) {
|
||||
// races
|
||||
switch (rand.nextInt(4)) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
this.playerModel.getModel().metadata.setRace(PonyRace.EARTH);
|
||||
break;
|
||||
case 3:
|
||||
case 2:
|
||||
this.playerModel.getModel().metadata.setRace(PonyRace.PEGASUS);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
this.playerModel.getModel().metadata.setRace(PonyRace.UNICORN);
|
||||
break;
|
||||
}
|
||||
this.playerModel.getModel().metadata.setGlowColor(rand.nextInt());
|
||||
// Let's play the lottery!
|
||||
if (rand.nextInt(10000) == 0) {
|
||||
this.playerModel.getModel().metadata.setRace(PonyRace.ALICORN);
|
||||
}
|
||||
// sizes
|
||||
if (entity.isChild()) {
|
||||
this.playerModel.getModel().metadata.setSize(PonySize.FOAL);
|
||||
} else {
|
||||
PonySize size = randEnum(rand, PonySize.class);
|
||||
this.playerModel.getModel().metadata.setSize(size != PonySize.FOAL ? size : PonySize.NORMAL);
|
||||
}
|
||||
this.playerModel.getModel().metadata.setTail(randEnum(rand, TailLengths.class));
|
||||
|
||||
// glow
|
||||
this.playerModel.getModel().metadata.setGlowColor(rand.nextInt());
|
||||
|
||||
}
|
||||
|
||||
private <T extends Enum<T>> T randEnum(Random rand, Class<T> en) {
|
||||
T[] values = en.getEnumConstants();
|
||||
return values[rand.nextInt(values.length)];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in a new issue