| 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 ModelSheep2 extends ModelQuadruped
|
| 8 | {
|
| 9 | private float headRotationAngleX;
|
| 10 |
|
| 11 | public ModelSheep2()
|
| 12 | {
|
| 13 | super(12, 0.0F);
|
| 14 | this.head = new ModelRenderer(this, 0, 0);
|
| 15 | this.head.addBox(-3.0F, -4.0F, -6.0F, 6, 6, 8, 0.0F);
|
| 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, 0.0F);
|
| 19 | this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
| 20 | }
|
| 21 |
|
| 22 | /**
|
| 23 | * Used for easily adding entity-dependent animations. The second and third float params here are the same second
|
| 24 | * and third as in the setRotationAngles method.
|
| 25 | */
|
| 26 | public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
|
| 27 | {
|
| 28 | super.setLivingAnimations(entitylivingbaseIn, p_78086_2_, p_78086_3_, partialTickTime);
|
| 29 | this.head.rotationPointY = 6.0F + ((EntitySheep)entitylivingbaseIn).getHeadRotationPointY(partialTickTime) * 9.0F;
|
| 30 | this.headRotationAngleX = ((EntitySheep)entitylivingbaseIn).getHeadRotationAngleX(partialTickTime);
|
| 31 | }
|
| 32 |
|
| 33 | /**
|
| 34 | * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
|
| 35 | * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
|
| 36 | * "far" arms and legs can swing at most.
|
| 37 | */
|
| 38 | public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
| 39 | {
|
| 40 | super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
|
| 41 | this.head.rotateAngleX = this.headRotationAngleX;
|
| 42 | }
|
| 43 | }
|
| 44 |
|