| 1 | package net.minecraft.client.model;
|
| 2 |
|
| 3 | import net.minecraft.entity.Entity;
|
| 4 | import net.minecraft.entity.EntityLivingBase;
|
| 5 | import net.minecraft.entity.passive.EntitySheep;
|
| 6 |
|
| 7 | public class ModelSheep1 extends ModelQuadruped
|
| 8 | {
|
| 9 | private float headRotationAngleX;
|
| 10 |
|
| 11 | public ModelSheep1()
|
| 12 | {
|
| 13 | super(12, 0.0F);
|
| 14 | this.head = new ModelRenderer(this, 0, 0);
|
| 15 | this.head.addBox(-3.0F, -4.0F, -4.0F, 6, 6, 6, 0.6F);
|
| 16 | this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
|
| 17 | this.body = new ModelRenderer(this, 28, 8);
|
| 18 | this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, 1.75F);
|
| 19 | this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
| 20 | float f = 0.5F;
|
| 21 | this.leg1 = new ModelRenderer(this, 0, 16);
|
| 22 | this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
| 23 | this.leg1.setRotationPoint(-3.0F, 12.0F, 7.0F);
|
| 24 | this.leg2 = new ModelRenderer(this, 0, 16);
|
| 25 | this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
| 26 | this.leg2.setRotationPoint(3.0F, 12.0F, 7.0F);
|
| 27 | this.leg3 = new ModelRenderer(this, 0, 16);
|
| 28 | this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
| 29 | this.leg3.setRotationPoint(-3.0F, 12.0F, -5.0F);
|
| 30 | this.leg4 = new ModelRenderer(this, 0, 16);
|
| 31 | this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
| 32 | this.leg4.setRotationPoint(3.0F, 12.0F, -5.0F);
|
| 33 | }
|
| 34 |
|
| 35 | /**
|
| 36 | * Used for easily adding entity-dependent animations. The second and third float params here are the same second
|
| 37 | * and third as in the setRotationAngles method.
|
| 38 | */
|
| 39 | public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
|
| 40 | {
|
| 41 | super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime);
|
| 42 | this.head.rotationPointY = 6.0F + ((EntitySheep)entitylivingbaseIn).getHeadRotationPointY(partialTickTime) * 9.0F;
|
| 43 | this.headRotationAngleX = ((EntitySheep)entitylivingbaseIn).getHeadRotationAngleX(partialTickTime);
|
| 44 | }
|
| 45 |
|
| 46 | /**
|
| 47 | * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
|
| 48 | * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
|
| 49 | * "far" arms and legs can swing at most.
|
| 50 | */
|
| 51 | public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
| 52 | {
|
| 53 | super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
|
| 54 | this.head.rotateAngleX = this.headRotationAngleX;
|
| 55 | }
|
| 56 | }
|
| 57 |
|