ModelSheep2 .java

net.minecraft.client.model.ModelSheep2 (class): members: headRotationAngleX, setLivingAnimations, setRotationAngles. imports: EntitySheep, Entity.

net.minecraft.client.modelclass44 linesclientextends ModelQuadruped1.9 KB

API Surface (2)

void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)

Fields & Constants (1)

headRotationAngleX

Code Graph: Dependencies (5)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ModelSheep2.java44 lines · MCP 1.8.9 · verbatimOriginal ↗
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

Deobfuscated MCP 1.8.9 source of ModelSheep2 from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/model/ModelSheep2.java), stored verbatim.